1
0
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:
Ivar 2016-09-28 23:54:19 +02:00 committed by Ivar Conradi Østhus
parent f5dc1e8abd
commit 7fa12095f2
2 changed files with 20 additions and 3 deletions

View File

@ -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": {}
}

View 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 });