Skip to content

Instantly share code, notes, and snippets.

@carlosazaustre
Last active August 29, 2015 14:23
Show Gist options
  • Save carlosazaustre/3c10bac00c5d622c9306 to your computer and use it in GitHub Desktop.
Save carlosazaustre/3c10bac00c5d622c9306 to your computer and use it in GitHub Desktop.
Development server with Gulp
var gulp = require('gulp');
var webserver = require('gulp-webserver');
var historyApi = require("connect-history-api-fallback");
gulp.task('server', function(){
gulp.src( path.root )
.pipe(webserver({
host : "0.0.0.0",
port : 8080,
livereload : true,
fallback : 'index.html',
middleware : [ historyApi ]
}));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment