Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pixelhandler/blog-admin
Manual test of ember-jsonapi-resources addon
https://github.com/pixelhandler/blog-admin
Last synced: about 2 months ago
JSON representation
Manual test of ember-jsonapi-resources addon
- Host: GitHub
- URL: https://github.com/pixelhandler/blog-admin
- Owner: pixelhandler
- Created: 2015-06-11T01:51:52.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-19T21:24:28.000Z (about 8 years ago)
- Last Synced: 2024-10-15T07:49:26.911Z (2 months ago)
- Language: JavaScript
- Homepage: ember-jsonapi-resources.com
- Size: 75.2 KB
- Stars: 7
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Blog-admin
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-resourcesIf 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:commentsember generate jsonapi-resource author name:string email:string \
posts:has-many:postsember generate jsonapi-resource comment body:string \
post:has-one:post commenter:has-one:commenterember generate jsonapi-resource commenter name:string \
email:string hash comments:has-many:commentsSetup 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/commentsNeed 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-proxyAdd routes for admin use:
ember generate route admin/create
ember generate route admin/index
ember generate route admin/edit
ember generate route admin/edit-errorAdd 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.
## Prerequisites
You will need the following things properly installed on your computer.
* [Git](http://git-scm.com/)
* [Node.js](http://nodejs.org/) (with NPM)
* [Bower](http://bower.io/)
* [Ember CLI](http://ember-cli.com/)
* [PhantomJS](http://phantomjs.org/)## Installation
* `git clone ` this repository
* `cd blog-admin`
* `npm install`
* `bower install`## Running / Development
* `ember serve`
* Visit your app at [http://localhost:4200](http://localhost:4200).### Code Generators
Make use of the many generators for code, try `ember help generate` for more details
### Running Tests
* `ember test`
* `ember test --server`### Building
* `ember build` (development)
* `ember build --environment production` (production)### Deploying
Specify what it takes to deploy your app.
## Further Reading / Useful Links
* [ember.js](http://emberjs.com/)
* [ember-cli](http://ember-cli.com/)
* Development Browser Extensions
* [ember inspector for chrome](https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi)
* [ember inspector for firefox](https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/)