1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 09:23:13 +01:00

Fix ESLint errors on server and dev server

This commit is contained in:
Brett Sun 2016-06-02 16:42:00 +02:00
parent aff95af78f
commit 42d35e7807
3 changed files with 8 additions and 5 deletions

View File

@ -2,7 +2,6 @@
/* eslint-disable import/no-extraneous-dependencies, import/newline-after-import */
'use strict';
const path = require('path');
const removeTrailingSlash = require('remove-trailing-slash');
const WebpackDevServer = require('webpack-dev-server');

View File

@ -1,6 +1,9 @@
/* eslint-disable strict, no-console */
'use strict';
const path = require('path');
const express = require('express');
const compression = require('compression');
const path = require('path');
const removeTrailingSlash = require('remove-trailing-slash');
const BASE_PATH = removeTrailingSlash(process.env.ONION_BASE_PATH || '/');
@ -13,9 +16,10 @@ app.use(compression());
app.use(path.join(BASE_PATH, '/static/js'), express.static(path.resolve(__dirname, 'dist/js')));
app.use(path.join(BASE_PATH, '/static/css'), express.static(path.resolve(__dirname, 'dist/css')));
app.use(path.join(BASE_PATH, '/static/fonts'), express.static(path.resolve(__dirname, 'dist/fonts')));
app.use(path.join(BASE_PATH, '/static/third_party'), express.static(path.resolve(__dirname, 'dist/third_party')));
app.use(path.join(BASE_PATH, '/static/third_party'),
express.static(path.resolve(__dirname, 'dist/third_party')));
app.get(/.*/, function(req, res) {
app.get(/.*/, (req, res) => {
console.log('%s %s', req.method, req.path);
res.sendFile(path.resolve(__dirname, 'dist/index.html'));
});

View File

@ -1,4 +1,4 @@
/* eslint-disable strict, no-console, object-shorthand */
/* eslint-disable strict, no-console, object-shorthand, prefer-template */
/* eslint-disable import/no-extraneous-dependencies, import/newline-after-import */
'use strict';