mirror of
https://github.com/zhigang1992/redux-form.git
synced 2026-01-12 22:51:41 +08:00
27 lines
612 B
JavaScript
27 lines
612 B
JavaScript
var path = require('path');
|
|
var express = require('express');
|
|
var webpack = require('webpack');
|
|
var config = require('./webpack.config.dev');
|
|
|
|
var app = express();
|
|
var compiler = webpack(config);
|
|
|
|
app.use(require('webpack-dev-middleware')(compiler, {
|
|
noInfo: true,
|
|
publicPath: config.output.publicPath
|
|
}));
|
|
|
|
app.use(require('webpack-hot-middleware')(compiler));
|
|
|
|
app.get('*', function(req, res) {
|
|
res.sendFile(path.join(__dirname, 'index.html'));
|
|
});
|
|
|
|
app.listen(3030, 'localhost', function(err) {
|
|
if (err) {
|
|
console.log(err);
|
|
return;
|
|
}
|
|
|
|
console.log('Listening at http://localhost:3030');
|
|
}); |