Skip to content

Instantly share code, notes, and snippets.

@jazibsawar

jazibsawar/server.js Secret

Created Jan 5, 2018
Embed
What would you like to do?
/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