Hi I was following a tutorial to build an nodejs app. This tutorial is using gulp, to run my app I just do gulp dev
to start all things. In my gulpfile I have:
var fs = require('fs')
var gulp = require('gulp')
fs.readdirSync(__dirname+'/gulp').forEach(function(task){
require('./gulp/' + task)
})
gulp.task('dev', ['watch:css', 'watch:js', 'dev:server'])
The code in ./gulp/server.js
var gulp = require('gulp')
var nodemon = require('gulp-nodemon')
gulp.task('dev:server', function(){
nodemon({
script: 'server.js',
ext:'js',
ignore: ['ng*', 'gulp*', 'assets*'],
env: { 'NODE_ENV': require('../config').ENV }
})
})
Is it possible somehow to use pm2 with this gulp setup, I saw some questions in stackoverflow and google, but cant get anything done. If someone can help me would be great. Thank you in advance.
./gulp/(server).js
– Gastroenteritis