forked from Laboratoria/LIM017-burger-queen-api-client
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathserver.js
More file actions
24 lines (19 loc) · 707 Bytes
/
server.js
File metadata and controls
24 lines (19 loc) · 707 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// const path = require('path');
// const express = require('express');
// const app = express();
// // Serve static files
// app.use(express.static(__dirname + '/dist/burger-queen'));
// // Send all requests to index.html
// app.get('/*', function(req, res) {
// res.sendFile(path.join(__dirname + '/dist/burger-queen/index.html'));
// });
// // default Heroku port
// app.listen(process.env.PORT || 5000);
const express = require('express');
const path = require('path');
const app = express();
app.use(express.static(__dirname + '/dist/burger-queen'));
app.get('/*', function(req,res) {
res.sendFile(path.join(__dirname+
'/dist/burger-queen/index.html'));});
app.listen(process.env.PORT || 4200);