Skip to content

Instantly share code, notes, and snippets.

@rxw1
Last active February 10, 2016 02:19
Show Gist options
  • Save rxw1/b02b59d633af05e6ef0a to your computer and use it in GitHub Desktop.
Save rxw1/b02b59d633af05e6ef0a to your computer and use it in GitHub Desktop.
webpackDevMiddleware, webpackHotMiddleware
// 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