Created
March 6, 2020 16:12
-
-
Save xola139/fc3e373dd3608b41853274de818fa00b 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
var express = require("express"); | |
var app = express(); | |
app.use(express.static("dist")); | |
app.use((req,res)=>{ | |
res.sendFile(path.join(__dirname, 'dist/index.html')); | |
}); | |
var server = app.listen(8081, function(){ | |
var port = server.address().port; | |
console.log("Server started at http://localhost:%s", port); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment