Created
November 26, 2017 10:07
-
-
Save mauricedb/bb0290b26322909686183c64a31ad3b7 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 path = require("path"); | |
const express = require("express"); | |
const serveStatic = require("serve-static"); | |
const reactApp = require("./react-app"); | |
const PORT = process.env.PORT || 3001; | |
const app = express(); | |
app.use(reactApp); | |
app.use(serveStatic(path.join(__dirname, "../build"))); | |
app.listen(PORT, () => { | |
console.log(`Server listening on port ${PORT}!`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment