Created
October 6, 2017 11:23
-
-
Save dohoons/6464c0a55eb837c874b44ae71e120cbe to your computer and use it in GitHub Desktop.
gulp-webserver charset euc-kr
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 mime = require('mime-types'); | |
gulp.task('default', function() { | |
gulp.src('./').pipe(webserver({ | |
host: '0.0.0.0', | |
port: 3000, | |
livereload: false, | |
directoryListing: false, | |
open: false, | |
middleware: function(req, res, next) { | |
res.setHeader("Content-Type",`${mime.lookup(req.url)}; charset=euc-kr`); | |
next(); | |
} | |
})); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment