Skip to content

Instantly share code, notes, and snippets.

@anmolsukki
Created May 6, 2020 20:48
Show Gist options
  • Select an option

  • Save anmolsukki/57d495f40a026d6359e58f891b0133d9 to your computer and use it in GitHub Desktop.

Select an option

Save anmolsukki/57d495f40a026d6359e58f891b0133d9 to your computer and use it in GitHub Desktop.
[ Build Deploy ] Build Deploy Locally with node server

Run Build Locally

node app.js
const express = require('express');
const path = require('path');
const app = express();
app.use(express.static(path.join(__dirname, 'build')));
app.get('/', function(req, res) {
res.sendFile(path.join(__dirname, 'build', 'index.html'));
});
app.listen(9000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment