mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-08 22:33:24 +00:00
more react changes, incomplete
This commit is contained in:
27
devServer.js
Normal file
27
devServer.js
Normal file
@@ -0,0 +1,27 @@
|
||||
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, 'src/index.html'));
|
||||
});
|
||||
|
||||
app.listen(3300, 'localhost', function(err) {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('Listening at http://localhost:3000');
|
||||
});
|
||||
Reference in New Issue
Block a user