Feature: First version of the REST API done

This commit is contained in:
2015-08-14 08:04:31 +00:00
commit e6fc0be0ed
28 changed files with 3170 additions and 0 deletions

16
app/routes.js Normal file
View File

@@ -0,0 +1,16 @@
var fs = require('fs');
module.exports = function(app) {
var routes_path = __dirname + '/routes'
fs.readdirSync(routes_path).forEach(function (file) {
if (~file.indexOf('.js')) {
var route = require(routes_path + '/' + file);
route(app);
}
})
app.get('*', function(req, res) {
res.sendfile('./public/views/index.html');
});
};