formations/javascript/angular/exercices/ng-resource/server.js
2019-03-25 13:14:16 +01:00

11 lines
282 B
JavaScript

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);