I need help integrating emberjs with pyramid.
I’ve just finished the basic tutorial and would like to try it out further with doing a single page application with pyramid + pgsql (CRUD) and with pyramid just returning json results.
Some questions that I have are:
Where do I put the emberjs in my Pyramid project folder.
For retrieving and sending json data, would this link be the appropriate api to follow ( JSONAPIAdapter - 4.4 - Ember API Documentation ), as I saw many conflicting discussions about ember-data that basically paints ember-data in a negative way.
Terminal 1 (cd to your pyramid-app directory):
$ pserve development.ini (or however it is started, notice the port it is being served)
Terminal 2 (cd to your ember-app directory):
$ ember server --proxy http://localhost:6543 (6543 is an example, use the port of your currently running pyramid-app)
Then open http://localhost:4200 to see your ember-app. All non-static-content (e.g. calls to api) will be redirected to your running pyramid-server.
If you want to go live, create a build of your Ember-App (again, see The Ember CLI - Introduction - Ember CLI Guides) and put it to the static-assets-location that you configured in your pyramid-app.
Regarding adapters: Each adapter supports a different JSON-format.
The RESTAdapter is a very basic adapter and brings its own conventions regarding the json-format (see the docs).
The JSONAPIAdapter is build around the JSON-API standard, see http://jsonapi.org for docs and examples. This is what most people want.