persistence.js is an asynchronous Javascript database mapper library. You can use it in the browser, as well on the server (and you can share data models between them).
The current node example in the readme is invalid (I could not get it to work). Newer versions of node treat modules differently than past versions. This exports the persistence module as well as the store config module for the following use example:
var persistence = require('persistencejs');
var PersistenceConfig = require('persistencejs').StoreConfig;
var siteStore = PersistenceConfig.init(persistence, {
adaptor: 'mysql',
...
});
This patch may need to be expanded upon depending if other files need to be exposed.
The current node example in the readme is invalid (I could not get it to work). Newer versions of node treat modules differently than past versions. This exports the persistence module as well as the store config module for the following use example:
This patch may need to be expanded upon depending if other files need to be exposed.