ej

ember-jsonapi

Create automatic JSONAPI endpoints based on incredibly simple JSON schemas.

Showing:

Popularity

Downloads/wk

0

GitHub Stars

3

Maintenance

Last Commit

5yrs ago

Contributors

1

Package

Dependencies

10

License

ISC

Type Definitions

Tree-Shakeable

No?

Categories

Readme

ember-jsonapi

Create automatic, database-backed JSONAPI endpoints based on incredibly simple JSON schemas.

Build Status

current setup how-to

ember init
# (switch to pods if you so choose)
ember install ember-jsonapi
ember g api
ember g login
npm run migrate
npm run seed
npm start

show user info how-to:

ember g route index
ember g controller index
# (hyperterm only)
# vi app/controllers/index.js
# add:
# session: Ember.inject.service()
# vi app/template/index.hbs
# <h1>Logged in as {{this.session.user.email}}</h1>
# vi app/styles/app.css
# add:
# body { background-color: oldlace; }

add db-backed model how-to:

# add a new model & schema
ember g schema post name:string user:belongsTo:user
ember g migration posts
npm run migrate
# open http://localhost:4200/api/posts/, see that posts are automatically there

# now add the relationship to the user
vi app/schemas/user.json
# add: "posts": { "type": "posts", "relationship": "hasMany" }
# open http://localhost:4200/api/users/1?include=posts, see that posts are now sidechained.

TODO:

[] integration tests for models/schemas & api endpoints

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial