OSDN Git Service

Modified: Upload, Command execution
[eos/zephyr.git] / cli / zephyr-serve
1 #!/usr/bin/env node
2
3 const zephyr = require('commander');
4 const chalk = require('chalk');
5 const cp = require('child_process').spawn;
6
7 zephyr
8 .usage('[action]')
9
10 process.env.NODE_ENV = 'production';
11 const npm = cp('node', ['--harmony', process.env.ZEPHYR_HOME + '/server/app/']);
12
13 npm.stdout.on('data', function (data) {
14     console.log(data.toString().trim());
15 });
16
17 npm.stderr.on('data', function (data) {
18     console.log(data.toString().trim());
19 });
20
21 zephyr.on('--help', function() {
22     console.log(('  Documentation can be found at ' + chalk.blue('http://www.yasunaga-lab.bio.kyutech.ac.jp/EosJ/index.php/zephyr')));
23     console.log('');
24 });
25
26 zephyr.parse(process.argv);