node app.js
Created
May 6, 2020 20:48
-
-
Save anmolsukki/57d495f40a026d6359e58f891b0133d9 to your computer and use it in GitHub Desktop.
[ Build Deploy ] Build Deploy Locally with node server
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 path = require('path'); | |
| const app = express(); | |
| app.use(express.static(path.join(__dirname, 'build'))); | |
| app.get('/', function(req, res) { | |
| res.sendFile(path.join(__dirname, 'build', 'index.html')); | |
| }); | |
| app.listen(9000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment