This is the adapter/Application folder.
I was trying to install and configure pouchdb when i started facing a series of errors.
import { Adapter } from 'ember-pouch';
import PouchDB from 'pouchdb';
//import config from 'intern-project/config/environment';
//import Ember from 'ember';
//const { assert, isEmpty } = Ember;
PouchDB.debug.enable('*');
var remote = new PouchDB('http://localhost:5984/offline');
var db = new PouchDB('Patient');
db.sync(remote, {
live: true, // do a live, ongoing sync
retry: true // retry if the conection is lost
});
export default Adapter.extend({
db: db
});
Here's the error ...
Uncaught Error: Failed to create an instance of 'adapter:application'. Most likely an improperly defined class or an invalid module export.
at instantiate (vendor.js:12083)
at lookup (vendor.js:11941)
at Container.lookup (vendor.js:11860)
at Class.lookup (vendor.js:42326)
at ContainerInstanceCache.instanceFor (vendor.js:103232)
at ContainerInstanceCache._findInstance (vendor.js:103221)
at ContainerInstanceCache.get (vendor.js:103209)
at Class.retrieveManagedInstance (vendor.js:102978)
at Class.lookupAdapter (vendor.js:102984)
at Class.adapterFor (vendor.js:102924)
And is there a source that clearly tells how to implement pouchdb along with ember js?
Aucun commentaire:
Enregistrer un commentaire