bitque/react-client/server.js

14 lines
327 B
JavaScript
Raw Normal View History

2020-03-28 21:41:16 +01:00
const express = require('express');
const fallback = require('express-history-api-fallback');
const compression = require('compression');
const app = express();
app.use(compression());
app.use(express.static(`${__dirname}/build`));
app.use(fallback(`${__dirname}/build/index.html`));
app.listen(process.env.PORT || 8081);