gulp-express-service

    1.2.3 • Public • Published

    USE:

    var expressService = require('gulp-express-service');
    gulp.task('coffee', function() {
    	return gulp.src(paths.coffee)
    	.pipe(coffee())
    	.pipe(gulp.dest('build'))
    	.pipe(expressService({file:'./build/service.js', NODE_ENV:'DEV'}));
    });
    
    gulp.task("watch", function() {
    	gulp.watch(paths.coffee, ['coffee']);
    });
    

    service.js

    express = require('express')
    app = express()
    
    app.get '/', (req, res)->
    	console.log res
    	res.send('hello world')
    
    app.listen(3000);
    console.log('Listening on port 3000');
    

    1.2.3 package.json补全依赖express

    1.2.2 启动优化

    1.2.0 增加env支持

    1.1.0 增加错误记录输出到控制台

    Install

    npm i gulp-express-service

    DownloadsWeekly Downloads

    0

    Version

    1.2.3

    License

    none

    Last publish

    Collaborators

    • colee