Serve clientbuild format on a single server program
This commit is contained in:
parent
f3f5dbd864
commit
08e328b8e4
|
@ -0,0 +1 @@
|
||||||
|
../../../sysut_client/src/client/build
|
|
@ -7,7 +7,7 @@ let tmdb = require("./tmdb.js");
|
||||||
|
|
||||||
// #region Express setup
|
// #region Express setup
|
||||||
const app = express();
|
const app = express();
|
||||||
const port = 5000;
|
const port = 3000;
|
||||||
app.listen(port, () => {
|
app.listen(port, () => {
|
||||||
console.log(`Listening on port ${port}`)
|
console.log(`Listening on port ${port}`)
|
||||||
})
|
})
|
||||||
|
@ -32,14 +32,14 @@ api.use(require('express-log-url'));
|
||||||
// res.redirect("https://asura.feal.no/");
|
// res.redirect("https://asura.feal.no/");
|
||||||
// });
|
// });
|
||||||
// Serve static files from the React app
|
// 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('/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.use('/static/*', express.static(path.join(__dirname, 'clientbuild/static')));
|
app.use('/static/*', express.static(path.join(__dirname, 'clientbuild/static')));
|
||||||
app.get('/*', function (req, res) {
|
// app.get('/*', function (req, res) {
|
||||||
res.sendFile(path.join(__dirname, 'clientbuild', 'index.html'));
|
// res.sendFile(path.join(__dirname, 'clientbuild', 'index.html'));
|
||||||
});
|
// });
|
||||||
// app.use('/*', express.static(path.join(__dirname, 'clientbuild')));
|
// app.use('/*', express.static(path.join(__dirname, 'clientbuild')));
|
||||||
|
|
||||||
// #endregion
|
// #endregion
|
||||||
|
|
Loading…
Reference in New Issue