Skip to content

Instantly share code, notes, and snippets.

@x2764tech
Last active August 29, 2015 13:57
Show Gist options
  • Save x2764tech/9507607 to your computer and use it in GitHub Desktop.
Save x2764tech/9507607 to your computer and use it in GitHub Desktop.
gulpfile.js for static site with live reload
var gulp = require('gulp');
var livereload = require('gulp-livereload');
var watch = require('gulp-watch');
var http = require('http');
var ecstatic = require('ecstatic');
gulp.task('default', function() {
http.createServer(
ecstatic({ root: __dirname })
).listen(8000);
gulp.src('**/*')
.pipe(watch())
.pipe(livereload())
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment