mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-01 00:08:27 +01:00
inital step to createing a exectutable unleash binary #150
This commit is contained in:
parent
91d685142b
commit
addf5d7e9d
@ -24,6 +24,9 @@
|
|||||||
"node": "6"
|
"node": "6"
|
||||||
},
|
},
|
||||||
"main": "./server.js",
|
"main": "./server.js",
|
||||||
|
"bin": {
|
||||||
|
"unleash": "NODE_ENV=production ./unleash.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-impl.js",
|
"start": "NODE_ENV=production node server-impl.js",
|
||||||
@ -31,10 +34,9 @@
|
|||||||
"test:ci": "npm run test"
|
"test:ci": "npm run test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"commander": "^2.9.0",
|
||||||
"unleash-api": "1.0.0-alpha.2",
|
"unleash-api": "1.0.0-alpha.2",
|
||||||
"unleash-frontend": "1.0.0-alpha.2"
|
"unleash-frontend": "1.0.0-alpha.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
15
packages/unleash-server/unleash.js
Executable file
15
packages/unleash-server/unleash.js
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
const program = require('commander');
|
||||||
|
const unleash = require('./server.js');
|
||||||
|
|
||||||
|
|
||||||
|
program
|
||||||
|
.command('start', 'start unleash server')
|
||||||
|
.command('migrate', 'migrate the unleash db')
|
||||||
|
.option('-d, --databaseUri <databaseUri>', 'The full databaseUri to connect to, including username and password')
|
||||||
|
.parse(process.argv);
|
||||||
|
|
||||||
|
unleash.start({ databaseUri: program.databaseUri });
|
Loading…
Reference in New Issue
Block a user