1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

Allow options overides such as databaseUri

This commit is contained in:
Ivar 2016-09-28 23:47:31 +02:00 committed by Ivar Conradi Østhus
parent cb49c0ee3f
commit 124799b200
3 changed files with 11 additions and 2 deletions

View File

@ -26,7 +26,7 @@
"main": "./server.js",
"scripts": {
"db-migrate-and-start": "npm run db-migrate && npm run start",
"start": "NODE_ENV=production node server.js",
"start": "NODE_ENV=production node server-impl.js",
"test": "echo 'TODO add server tests'; exit 0;",
"test:ci": "npm run test"
},

View File

@ -0,0 +1,3 @@
'use strict';
require('./server.js').start();

View File

@ -2,4 +2,10 @@
const unleash = require('unleash-api');
const { publicFolder } = require('unleash-frontend');
unleash.start({ publicFolder });
module.exports = {
start: options => {
const opts = Object.assign({}, { publicFolder }, options);
return unleash.start(opts);
},
};