<commit_before>import Express from 'express';
import Morgan from 'Morgan';
import React from 'react';
import ReactDOMServer from 'react-dom/server';
import App from '../app/components/App';
import {styles, scripts} from './params.node';
import Layout from './layout';

const PORT = process.env.PORT || throwError('Port should be specified by environment variable');
const STATIC = process.env.STATIC || throwError('Static folder should be specified by environment variable');
const app = Express();

app.use(Morgan('common'));
app.use(Express.static(STATIC));

app.get('/*', (request, response) => response.send(Layout('Evo', styles, scripts, ReactDOMServer.renderToString(<App path={request.url}/>))));

app.listen(PORT);

function throwError(msg) {
	throw new Error(msg);
}<commit_msg>node: use variable for better readability<commit_after>import Express from 'express';
import Morgan from 'Morgan';
import React from 'react';
import ReactDOMServer from 'react-dom/server';
import App from '../app/components/App';
import {styles, scripts} from './params.node';
import Layout from './layout';

const PORT = process.env.PORT || throwError('Port should be specified by environment variable');
const STATIC = process.env.STATIC || throwError('Static folder should be specified by environment variable');
const app = Express();

app.use(Morgan('common'));
app.use(Express.static(STATIC));

app.get('/*', (request, response) => {
	const markup = ReactDOMServer.renderToString(<App path={request.url} />);
	return response.send(Layout('Evo', styles, scripts, markup));
});

app.listen(PORT);

function throwError(msg) {
	throw new Error(msg);
}
{'fraction_non_alphanumeric': 0.15365853658536585, 'fraction_numerical': 0.0, 'mean_word_length': 6.073275862068965, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1417564', 'n_tokens_mistral': 462, 'n_tokens_neox': 452, 'n_words': 147}