Created
April 30, 2021 17:56
-
-
Save walidum/3eb59c5c683814db0a1b3939bb6751c9 to your computer and use it in GitHub Desktop.
node express server
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(); | |
app.use(express.static(__dirname + '/dist/<FOLDER_NAME>')); | |
app.get('/*', (req,res,next) => { | |
res.sendFile(path.join(__dirname + '/dist/dictionary/index.html')); | |
}); | |
app.listen(process.env.PORT || 8000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment