Last active
April 11, 2020 00:15
-
-
Save joshtrigger/b4d8e4d53cb6ad54f49c4cdf245ad946 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const app = express(); | |
const path = require('path'); | |
app.use(express.static(__dirname + '/dist/<app-name>')); | |
app.get('*', (req, res) => { | |
res.sendFile(path.join(__dirname + '/dist/<app-name>/index.html')); | |
}); | |
app.listen(process.env.PORT || 5000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment