Update
This commit is contained in:
parent
d2e750c446
commit
3ec65bb72d
1 changed files with 9 additions and 5 deletions
14
server.js
14
server.js
|
|
@ -28,11 +28,6 @@ db.mongoose
|
|||
}
|
||||
});
|
||||
|
||||
//app.use(express.static(__dirname + '/dist/frontend'));
|
||||
app.get('/*', function(req,res) {
|
||||
res.sendFile(path.join(__dirname+ '/dist/frontend/index.html'));
|
||||
});
|
||||
|
||||
require("./app-backend/routes/user.routes")(app);
|
||||
require("./app-backend/routes/playlist.routes")(app);
|
||||
require("./app-backend/routes/video.routes")(app);
|
||||
|
|
@ -70,6 +65,15 @@ User.exists({role: roles.SuperAdmin}, function (err, docs){
|
|||
}
|
||||
});
|
||||
|
||||
app.get('/*all', function(req,res) {
|
||||
res.sendFile(path.join(__dirname+ '/dist/index.html'));
|
||||
});
|
||||
|
||||
app.use(express.static(__dirname + '/dist/frontend'));
|
||||
app.get('/*', function(req,res) {
|
||||
res.sendFile(path.join(__dirname+ '/dist/frontend/index.html'));
|
||||
});
|
||||
|
||||
app.listen(port, '0.0.0.0',() => {
|
||||
console.log (`listening on port ${port}`);
|
||||
});
|
||||
|
|
|
|||
Reference in a new issue