microservices: configuration

This commit is contained in:
Vicente Falco 2017-11-09 07:45:46 +01:00
parent 14820fbb3e
commit 10c52a75b9
6 changed files with 19 additions and 4 deletions

View File

@ -4,3 +4,6 @@ var vnLoopback = require('../../loopback/server/server.js');
var app = module.exports = vnLoopback.loopback();
app.set('applications', require('./application.json'));
vnLoopback.boot(app, __dirname);
if (require.main === module) {
app.start();
}

View File

@ -3,3 +3,6 @@ var vnLoopback = require('../../loopback/server/server.js');
var app = module.exports = vnLoopback.loopback();
vnLoopback.boot(app, __dirname);
if (require.main === module) {
app.start();
}

View File

@ -84,11 +84,10 @@ function vnBoot(app, rootDir, cb) {
boot(app, bootOptions, function(err) {
if (err) throw err;
if (require.main === module) {
app.start();
}
if (cb)
cb(app);
});
if (require.main === module) {
app.start();
}
}

View File

@ -2,3 +2,6 @@ var vnLoopback = require('../../loopback/server/server.js');
var app = module.exports = vnLoopback.loopback();
vnLoopback.boot(app, __dirname);
if (require.main === module) {
app.start();
}

View File

@ -3,3 +3,6 @@ var vnLoopback = require('../../loopback/server/server.js');
var app = module.exports = vnLoopback.loopback();
vnLoopback.boot(app, __dirname);
if (require.main === module) {
app.start();
}

View File

@ -11,3 +11,7 @@ app.set('url auth', '/auth');
app.use(cookieParser());
vnLoopback.boot(app, __dirname);
if (require.main === module) {
app.start();
}