mirror of
https://github.com/Febbweiss/CloudBudget.git
synced 2026-03-04 22:35:38 +00:00
Feature: First version of the REST API done
This commit is contained in:
16
app/routes.js
Normal file
16
app/routes.js
Normal 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');
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user