mirror of
https://github.com/Kong/insomnia
synced 2024-11-07 22:30:15 +00:00
27 lines
545 B
JavaScript
27 lines
545 B
JavaScript
'use strict';
|
|
|
|
const express = require('express');
|
|
const webpack = require('webpack');
|
|
const config = require('../webpack/dev.config');
|
|
|
|
const app = express();
|
|
const compiler = webpack(config);
|
|
|
|
const PORT = 3333;
|
|
|
|
app.use(require('webpack-dev-middleware')(compiler, {
|
|
publicPath: config.output.publicPath,
|
|
stats: {colors: true}
|
|
}));
|
|
|
|
app.use(require('webpack-hot-middleware')(compiler));
|
|
|
|
app.listen(PORT, 'localhost', err => {
|
|
if (err) {
|
|
console.log(err);
|
|
return;
|
|
}
|
|
|
|
console.log(`Listening at http://localhost:${PORT}`);
|
|
});
|