mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-01 00:08:27 +01:00
Allow options overides such as databaseUri
This commit is contained in:
parent
e48518f0df
commit
91d685142b
@ -26,7 +26,7 @@
|
|||||||
"main": "./server.js",
|
"main": "./server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"db-migrate-and-start": "npm run db-migrate && npm run start",
|
"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": "echo 'TODO add server tests'; exit 0;",
|
||||||
"test:ci": "npm run test"
|
"test:ci": "npm run test"
|
||||||
},
|
},
|
||||||
|
3
packages/unleash-server/server-impl.js
Normal file
3
packages/unleash-server/server-impl.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
require('./server.js').start();
|
@ -2,4 +2,10 @@
|
|||||||
const unleash = require('unleash-api');
|
const unleash = require('unleash-api');
|
||||||
const { publicFolder } = require('unleash-frontend');
|
const { publicFolder } = require('unleash-frontend');
|
||||||
|
|
||||||
unleash.start({ publicFolder });
|
|
||||||
|
module.exports = {
|
||||||
|
start: options => {
|
||||||
|
const opts = Object.assign({}, { publicFolder }, options);
|
||||||
|
return unleash.start(opts);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user