Created
August 31, 2016 23:12
-
-
Save jonburger/01306a5cf67a422d2450ad619933902d to your computer and use it in GitHub Desktop.
Make gulp-connect accept POST
This file contains hidden or 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
connect.server({ | |
port: 8080, | |
root: './dist', | |
middleware: function(connect, opt) { | |
return [ | |
function(req, res, next){ | |
// treat POST request like GET during dev | |
req.method = 'GET'; | |
return next(); | |
} | |
]; | |
}, | |
livereload: true | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment