fix Express5 wildcard route syntax, restore node-cron

This commit is contained in:
sumit-plena
2026-07-07 17:20:56 +05:30
parent 841aa843fd
commit 2e366b8e06

View File

@@ -45,7 +45,7 @@ app.post('/_cron/tick', (req, res) => {
const publicDir = path.join(__dirname, '../public');
app.use(express.static(publicDir));
app.get('*', (req, res, next) => {
app.get('/{*path}', (req, res, next) => {
if (req.path.startsWith(apiRoot)) return next();
if (req.path === '/_cron/tick') return next();
res.sendFile(path.join(publicDir, 'index.html'), (err) => {