|
|
@ -1,4 +1,5 @@ |
|
|
|
const { spawn } = require('child_process'); |
|
|
|
const { spawn } = require('child_process'); |
|
|
|
|
|
|
|
const nodemon = require('nodemon'); |
|
|
|
|
|
|
|
|
|
|
|
const webpack = spawn('webpack', ['--config', 'build/webpack.dev.conf.js'], { |
|
|
|
const webpack = spawn('webpack', ['--config', 'build/webpack.dev.conf.js'], { |
|
|
|
stdio: 'inherit', |
|
|
|
stdio: 'inherit', |
|
|
@ -8,12 +9,9 @@ const webpack = spawn('webpack', ['--config', 'build/webpack.dev.conf.js'], { |
|
|
|
var env = Object.create(process.env); |
|
|
|
var env = Object.create(process.env); |
|
|
|
env.LOG_LEVEL = 'debug'; |
|
|
|
env.LOG_LEVEL = 'debug'; |
|
|
|
|
|
|
|
|
|
|
|
const nodemon = spawn( |
|
|
|
nodemon({ env, script: 'dist/server-dev.js' }) |
|
|
|
'nodemon', |
|
|
|
.on('start', function () { |
|
|
|
['--exec', '"node --inspect dist/server-dev.js"'], |
|
|
|
console.log('nodemon started'); |
|
|
|
{ env: env, shell: true } |
|
|
|
}).on('crash', function () { |
|
|
|
); |
|
|
|
console.log('hastic-server crashed'); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
nodemon.stdout.pipe(process.stdout); |
|
|
|
|
|
|
|
nodemon.stderr.pipe(process.stderr); |
|
|
|
|
|
|
|