Skip to content

Instantly share code, notes, and snippets.

@jazibsawar
Created January 5, 2018 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jazibsawar/90b60129ecb265d9c0306c92b78f8c78 to your computer and use it in GitHub Desktop.
Save jazibsawar/90b60129ecb265d9c0306c92b78f8c78 to your computer and use it in GitHub Desktop.
/server.js
const express = require('express');
const path = require('path');
const serveStatic = require('serve-static');
const history = require('connect-history-api-fallback');
app = express();
app.use(history());
app.use(serveStatic(__dirname + "/dist"));
const port = process.env.PORT || 5000;
app.listen(port);
console.log(`Server started on port ${port}`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment