-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
50 lines (40 loc) · 1018 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
var gulp = require('gulp')
,nodemon = require('gulp-nodemon')
,gulpMultiProcess = require('gulp-multi-process');
gulp.task('run:math-service', function(cb){
nodemon({
script: 'services/math-service.js',
ext: 'js'
});
cb();
});
gulp.task('run:hello-service', function(cb){
nodemon({
script: 'services/hello-service.js',
ext: 'js'
});
cb();
});
gulp.task('run:user-service', function(cb){
nodemon({
script: 'services/user-service.js',
ext: 'js'
});
cb();
});
gulp.task('run:server', function(){
nodemon({
script: 'server.js',
ext: 'js'
});
});
gulp.task('run:services', function(cb) {
// task1 and task2 will run in different processes
return gulpMultiProcess(['run:hello-service', 'run:math-service', 'run:user-service' ], cb);
});
gulp.task('run:all', function(cb) {
// task1 and task2 will run in different processes
return gulpMultiProcess(['run:services', 'run:server' ], cb);
});
// Default Task
gulp.task('default', ['run:all']);