Sha256: 7ddd02e9dc2ddc4c2a159a71252bd2456208f6c58a925c90f531ce2ac277757c
Contents?: true
Size: 731 Bytes
Versions: 4
Compression:
Stored size: 731 Bytes
Contents
const path = require('path'); const express = require('express'); const webpack = require('webpack'); const webpackDevMiddleware = require('webpack-dev-middleware'); const rootPath = '..'; const app = express(); const config = require(`${rootPath}/webpack.config.js`); const compiler = webpack(config); app.use(webpackDevMiddleware(compiler, { publicPath: config.output.publicPath })); app.get('/', function(req, res) { res.sendFile(path.join(__dirname, `${rootPath}/dev/`)); }); app.get('/loco-model.js', function(req, res) { res.sendFile(path.join(__dirname, `${rootPath}/node_modules/loco-js-model/dist/loco-model.js`)); }); app.listen(3000, function () { console.log('Example app listening on port 3000!\n'); });
Version data entries
4 entries across 4 versions & 1 rubygems