Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. const express = require('express');
  2. const app = express();
  3. const port = process.env.PORT || 8085
  4. app
  5. .use(express.static(__dirname + '/dist/'))
  6. .get(/.*/, (req, res) => {
  7. res.sendFile(__dirname + '/dist/index.html');
  8. })
  9. .listen(port);
  10.  
  11. console.log('On'); // Sets what Port the Server is listening on
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement