Change static listening path

This commit is contained in:
Felix Albrigtsen 2022-03-28 21:21:55 +02:00
parent f2e3059394
commit d97e943ff1
1 changed files with 4 additions and 3 deletions

View File

@ -7,7 +7,7 @@ let tmdb = require("./tmdb.js");
// #region Express setup // #region Express setup
const app = express(); const app = express();
const port = 3001; const port = 3000;
app.listen(port, () => { app.listen(port, () => {
console.log(`Listening on port ${port}`) console.log(`Listening on port ${port}`)
}) })
@ -27,7 +27,8 @@ api.use(require('express-log-url'));
// #region frontend // #region frontend
// Serve static files from the React app // Serve static files from the React app
app.use('/static', express.static(path.join(__dirname, 'clientbuild'))); app.use('/', express.static(path.join(__dirname, 'clientbuild')));
app.use('/tournament/', express.static(path.join(__dirname, 'clientbuild')));
// #endregion // #endregion
@ -262,4 +263,4 @@ api.post("/tournament/:tournamentId/createTeam", (req, res) => {
}); });
// #endregion // #endregion