Created
October 17, 2022 16:02
-
-
Save Tonel/900182f7a85de60b1d7f73c37f932c76 to your computer and use it in GitHub Desktop.
This file contains 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 path = require("path"); | |
const app = express() | |
const PORT = process.env.PORT || 3000 | |
app.use(express.static(path.join(__dirname, "build"))) | |
app.get("*", function (req, res) { | |
res.sendFile(path.join(__dirname, "build", "index.html")) | |
}) | |
app.listen(PORT) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment