mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-21 05:20:24 +08:00
17 lines
436 B
TypeScript
17 lines
436 B
TypeScript
import * as express from 'express';
|
|
import * as webpack from 'webpack';
|
|
import * as webpackHotMiddleware from 'webpack-hot-middleware';
|
|
|
|
const compiler = webpack({});
|
|
|
|
let webpackHotMiddlewareInstance = webpackHotMiddleware(compiler);
|
|
|
|
webpackHotMiddlewareInstance = webpackHotMiddleware(compiler, {
|
|
log: console.log.bind(console),
|
|
path: '/__what',
|
|
heartbeat: 2000,
|
|
});
|
|
|
|
const app = express();
|
|
app.use(webpackHotMiddlewareInstance);
|