Name: drf-ember-frontend
Owner: Duke Center for Genomic and Computational Biology
Description: Ember Addon to connect to Django REST Framework
Created: 2018-01-12 15:47:43.0
Updated: 2018-01-12 15:48:00.0
Pushed: 2018-01-13 22:38:08.0
Homepage: null
Size: 261
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Ember Addon for connecting to Django REST Framework APIs using drf-ember-backend.
Includes adapter, serializer, and authenticator classes:
From another ember application:
ember install ember-drf-frontend
Example adapter:
pp/adapters/application.js
rt DRFAdapter from 'drf-ember-frontend/adapters/drf-adapter';
rt default DRFAdapter.extend({
st: 'http://127.0.0.1:8000',
mespace: 'api/v2'
Example serializer:
pp/serializers/application.js
rt DRFSerializer from 'drf-ember-frontend/serializers/drf-serializer';
rt default DRFSerializer.extend();
clone git@github.com:Duke-GCB/drf-ember-frontend.git
rf-ember-frontend
install
link
to/hosting/application
link drf-ember-frontend
npm link drf-ember-frontend
creates a symlink in the hosting application's node_modules
directory, referring back to this addon's directory. The hosting ember application picks it up from there
Edit package.json
in the hosting application, and add the following to the devDependencies
array:
drf-ember-frontend": "*"
Notes:
drf-ember-frontend
listed as a dependency in the hosting application, npm install
will attempt to install it from npm. This will either fail (404) or overwrite the symlink with a version from npm.npm test
(Runs ember try:each
to test your addon against multiple Ember versions)ember test
ember test --server