Created
March 6, 2014 22:19
-
-
Save manolenso/9400975 to your computer and use it in GitHub Desktop.
Gulp server
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
/* | |
* Runs a static server on port 3000 | |
**/ | |
gulp.task('serve', function () { | |
const PORT = 3000; | |
var fileServer = new (require('node-static')).Server(SITE_DIR); | |
require('http').createServer(function (request, response) { | |
request.addListener('end', function () { | |
fileServer.serve(request, response); | |
}).resume(); | |
}).listen(PORT); | |
gutil.log(gutil.colors.blue('HTTP server listening on port', PORT)); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment