feat(backend): configure Dockerfile and express server to build and serve mobile app at /mobile on Cloud Run
This commit is contained in:
@@ -48,6 +48,14 @@ app.use(express.static(publicDir));
|
||||
app.get('/{*path}', (req, res, next) => {
|
||||
if (req.path.startsWith(apiRoot)) return next();
|
||||
if (req.path === '/_cron/tick') return next();
|
||||
|
||||
if (req.path.startsWith('/mobile')) {
|
||||
res.sendFile(path.join(publicDir, 'mobile/index.html'), (err) => {
|
||||
if (err) next();
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
res.sendFile(path.join(publicDir, 'index.html'), (err) => {
|
||||
if (err) next();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user