Deployment
// build the client
cd client && npm run build
// serve the client
npm run serveRunning The Client & Server Together
// serve static files in production
if (process.env.NODE_ENV === 'production'){
app.use(express.static(path.join(__dirname, 'client/dist')));
app.get('*', (req, res) => {
res.sendFile(path.join(__dirname + '/client/dist/index.html'))
});
}
```Environment Variables
Heroku Deployment Tutorial
Last updated