Last active
February 10, 2016 02:19
-
-
Save rxw1/b02b59d633af05e6ef0a to your computer and use it in GitHub Desktop.
webpackDevMiddleware, webpackHotMiddleware
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
// import webpack from 'webpack'; | |
// var compiler = webpack(config.webpack()); | |
// const webpackDevMiddleware = (next) => | |
// function *() { | |
// return require("webpack-dev-middleware")(compiler, | |
// config.webpackDev(port)); | |
// yield next; | |
// } | |
// const webpackHotMiddleware = (next) => | |
// function *() { | |
// return require("webpack-hot-middleware")(compiler, | |
// config.webpackHot()); | |
// yield next; | |
// }; | |
// const webpackHotMiddleware = (next) => | |
// function *() { | |
// this.body = yield require('webpack-hot-middleware')(compiler) | |
// .bind(null, this.req, this.res); | |
// yield next; | |
// }; | |
export default app | |
.use(logger()) | |
.use(helmet()) | |
// .use(compress()) | |
.use(serve(publicPath)) | |
.use(cors(config.cors)) | |
.use(bodyparser()) | |
.use(favicon()) | |
.use(render()) | |
// .use(webpackDevMiddleware()) | |
// .use(webpackHotMiddleware()) | |
.listen(port); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment