diff --git a/src/server/clientbuild b/src/server/clientbuild new file mode 120000 index 0000000..4c7af6a --- /dev/null +++ b/src/server/clientbuild @@ -0,0 +1 @@ +../../../sysut_client/src/client/build \ No newline at end of file diff --git a/src/server/index.js b/src/server/index.js index 9ed1cf0..bc96a80 100644 --- a/src/server/index.js +++ b/src/server/index.js @@ -7,7 +7,7 @@ let tmdb = require("./tmdb.js"); // #region Express setup const app = express(); -const port = 5000; +const port = 3000; app.listen(port, () => { console.log(`Listening on port ${port}`) }) @@ -32,14 +32,14 @@ api.use(require('express-log-url')); // res.redirect("https://asura.feal.no/"); // }); // Serve static files from the React app -// app.use('/', express.static(path.join(__dirname, 'clientbuild'))); +app.use('/', express.static(path.join(__dirname, 'clientbuild'))); // app.use('/tournament/', express.static(path.join(__dirname, 'clientbuild', 'index.html'))); -// app.use('/tournament/*', express.static(path.join(__dirname, 'clientbuild', 'index.html'))); +app.use('/tournament/*', express.static(path.join(__dirname, 'clientbuild', 'index.html'))); app.use('/static', express.static(path.join(__dirname, 'clientbuild/static'))); app.use('/static/*', express.static(path.join(__dirname, 'clientbuild/static'))); -app.get('/*', function (req, res) { - res.sendFile(path.join(__dirname, 'clientbuild', 'index.html')); -}); +// app.get('/*', function (req, res) { + // res.sendFile(path.join(__dirname, 'clientbuild', 'index.html')); +// }); // app.use('/*', express.static(path.join(__dirname, 'clientbuild'))); // #endregion