Skip to content

Instantly share code, notes, and snippets.

View Mwamitovi's full-sized avatar
🇺🇬
For Greater Horizons

Matovu Mwamitovi

🇺🇬
For Greater Horizons
  • https://kanzucode.com
  • Kampala, Uganda, East-Africa
View GitHub Profile
@Mwamitovi
Mwamitovi / config.js
Created August 6, 2020 14:25
Serve a react project on Heroku
// Step-1:
// create a script server file at the project root e.g. server.js
const path = require('path');
const express = require('express');
const app = express();
const port = process.env.PORT || 3000;
const publicPath = path.join(__dirname, 'build');
// serve the build folder