mirror of
https://gitlab.silvrtree.co.uk/martind2000/obrand-admin-server.git
synced 2025-01-10 23:45:07 +00:00
17 lines
454 B
JavaScript
17 lines
454 B
JavaScript
|
/*jshint node:true*/
|
||
|
|
||
|
module.exports = function(app) {
|
||
|
var globSync = require('glob').sync;
|
||
|
var mocks = globSync('./mocks/**/*.js', { cwd: __dirname }).map(require);
|
||
|
var proxies = globSync('./proxies/**/*.js', { cwd: __dirname }).map(require);
|
||
|
|
||
|
|
||
|
// Log proxy requests
|
||
|
var morgan = require('morgan');
|
||
|
app.use(morgan('dev'));
|
||
|
|
||
|
mocks.forEach(function(route) { route(app); });
|
||
|
proxies.forEach(function(route) { route(app); });
|
||
|
|
||
|
};
|