formations/javascript/angular/exercices/ng-resource/server.js

11 lines
282 B
JavaScript
Raw Normal View History

2015-04-10 01:46:41 +02:00
var express = require('express');
var warehouse = require('warehousejs');
var NeBackend = require('warehousejs/backend/nedb');
var app = express();
var store = new NeBackend().objectStore('entities', {filename: 'data.nedb'});
warehouse.applyRoutes(app, store);
app.listen(3000);