Last active
August 29, 2015 14:23
-
-
Save carlosazaustre/3c10bac00c5d622c9306 to your computer and use it in GitHub Desktop.
Development server with Gulp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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