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

Version Path
loco-rails-3.0.3 test/dummy/node_modules/loco-js/dev/server.js
loco-rails-3.0.2 test/dummy/node_modules/loco-js/dev/server.js
loco-rails-3.0.1 test/dummy/node_modules/loco-js/dev/server.js
loco-rails-3.0.0 test/dummy/node_modules/loco-js/dev/server.js