{"size": 863, "ext": "js", "max_stars_repo_path": "server.js", "max_stars_repo_name": "Rodrive/docsbox", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "server.js", "max_issues_repo_name": "Rodrive/docsbox", "max_issues_repo_issues_event_min_datetime": "2017-04-12T12:28:52.000Z", "max_issues_repo_issues_event_max_datetime": "2017-04-12T12:45:03.000Z", "max_forks_repo_path": "server.js", "max_forks_repo_name": "Rodrive/docsbox", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 3, "max_forks_count": null, "avg_line_length": 25.3823529412, "max_line_length": 72, "alphanum_fraction": 0.6871378911}
const express = require('express');
const path = require('path');
const webpack = require('webpack');
//eslint-disable-next-line
const webpackDev = require('webpack-dev-middleware');
//eslint-disable-next-line
const webpackHot = require('webpack-hot-middleware');
const config = require('./webpack.dev.config');

const app = express();
const compiler = webpack(config);

app.use(webpackDev(compiler, {
  publicPath: config.output.publicPath,
}));

app.use(webpackHot(compiler));

app.use('/static', express.static(path.join(__dirname, '/web/static')));
app.use('/dist', express.static(path.join(__dirname, '/web/dist')));

app.get('*', (req, res) => {
  res.sendFile(path.join(__dirname, 'web/index.html'));
});

// eslint-disable-next-line
app.listen(80, (err) => {
  if (err) {
    return console.log(err);
  }

  console.log('Server running on port: 80');
});
