mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
inital step to createing a exectutable unleash binary #150
This commit is contained in:
parent
f5dc1e8abd
commit
7fa12095f2
@ -24,6 +24,9 @@
|
||||
"node": "6"
|
||||
},
|
||||
"main": "./server.js",
|
||||
"bin": {
|
||||
"unleash": "NODE_ENV=production ./unleash.js"
|
||||
},
|
||||
"scripts": {
|
||||
"db-migrate-and-start": "npm run db-migrate && npm run start",
|
||||
"start": "NODE_ENV=production node server-impl.js",
|
||||
@ -31,10 +34,9 @@
|
||||
"test:ci": "npm run test"
|
||||
},
|
||||
"dependencies": {
|
||||
"commander": "^2.9.0",
|
||||
"unleash-api": "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