feat(backend): configure Dockerfile and express server to build and serve mobile app at /mobile on Cloud Run

This commit is contained in:
sumit-plena
2026-07-09 11:41:04 +05:30
parent 1a5028b8f3
commit 9c7c576c99
9 changed files with 540 additions and 22 deletions

View File

@@ -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();
});