Reputation: 6060
How to configure gulp-connect
to run file at bin/www
(express)? I can't make it work, I find no documentation on gulp-connect site that deal with config/change the starting file used by gulp-connect
.
var gulp = require('gulp'),
connect = require('gulp-connect');
gulp.task('webserver', function() {
connect.server({
root: 'app',
livereload: true
});
});
gulp.task('default', ['webserver']);
Upvotes: 1
Views: 462
Reputation: 177
Why are using you using both "Express" and "gulp-connect" ?
You should just stick to one.
Assign root : bin/www
and it should work or root: [__dirname]
Alternatively use:
path = require('path')
and then root: path.resolve('./')
Upvotes: 0