Skip to content

Commit ee0543e

Browse files
committed
Fix some linting errors.
1 parent dfa011f commit ee0543e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/universal/server/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint-disable no-console, no-use-before-define */
2+
13
import path from 'path';
24
import Express from 'express';
35
import qs from 'qs';
@@ -9,7 +11,7 @@ import configureStore from '../common/store/configureStore';
911
import App from '../common/containers/App';
1012
import { fetchCounter } from '../common/api/counter';
1113

12-
const app = Express();
14+
const app = new Express();
1315
const port = 3000;
1416

1517
// Use this middleware to server up static files built into dist
@@ -19,16 +21,14 @@ app.use(require('serve-static')(path.join(__dirname, '../dist')));
1921
app.use(handleRender);
2022

2123
function handleRender(req, res) {
22-
2324
// Query our mock API asynchronously
2425
fetchCounter(apiResult => {
25-
2626
// Read the counter from the request, if provided
2727
const params = qs.parse(req.query);
28-
const counter = parseInt(params.counter) || apiResult || 0;
28+
const counter = parseInt(params.counter, 10) || apiResult || 0;
2929

3030
// Compile an initial state
31-
let initialState = { counter };
31+
const initialState = { counter };
3232

3333
// Create a new Redux store instance
3434
const store = configureStore(initialState);

0 commit comments

Comments
 (0)