You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
583 B
26 lines
583 B
8 years ago
|
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[0].output.publicPath
|
||
|
}));
|
||
|
|
||
|
// app.use(require('webpack-hot-middleware')(compiler));
|
||
|
|
||
|
app.use('/', express.static('./'));
|
||
|
|
||
|
var port = 7355
|
||
|
app.listen(port, 'localhost', function(err) {
|
||
|
if (err) {
|
||
|
console.log(err);
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
console.log('Listening at http://localhost:' + port);
|
||
|
});
|