Steps used to setup this repo as a test for using ember-jsonapi-resources addon:
ember new blog-admin
cd blog-admin
npm rm ember-data --save-dev
ember install ember-jsonapi-resources
If working on ember-jsonapi-resources locally use npm link:
npm link ember-jsonapi-resources
Generate some resources:
ember generate jsonapi-resource post title:string slug:string date \
excerpt:string body:string author:has-one:author \
comments:has-many:comments
ember generate jsonapi-resource author name:string email:string \
posts:has-many:posts
ember generate jsonapi-resource comment body:string \
post:has-one:post commenter:has-one:commenter
ember generate jsonapi-resource commenter name:string \
email:string hash comments:has-many:comments
Setup a proxy to a live API:
ember generate http-proxy api https://pixelhandler.com
Setup the host and API path config:
vim config/environment.js
APP: {
// Here you can pass flags/options to your application instance
// when it is created
+ API_HOST: 'https://pixelhandler.com',
+ API_PATH: 'api/v1'
}
Install an addon to use Markdown syntax:
ember install ember-cli-showdown
Generate some routes and templates:
ember generate route application
ember generate route application-error
ember generate route index
ember generate route post
ember generate route post-error
ember generate route post/detail
ember generate template post/comments
Need a controller for comments in named outlet:
ember generate controller post/comments
Create a form component:
ember generate component form-post
ember install ember-buffered-proxy
Add routes for admin use:
ember generate route admin/create
ember generate route admin/index
ember generate route admin/edit
ember generate route admin/edit-error
Add mixin for error handling:
ember generate mixin application-errors
Add edit controller
ember generate controller admin/edit
Create code for listing, details pages and edit forms, etc.
You will need the following things properly installed on your computer.
git clone <repository-url>
this repositorycd blog-admin
npm install
bower install
ember serve
- Visit your app at http://localhost:4200.
Make use of the many generators for code, try ember help generate
for more details
ember test
ember test --server
ember build
(development)ember build --environment production
(production)
Specify what it takes to deploy your app.