fix: pin Express to v4 to avoid path-to-regexp v8 breaking changes
This commit is contained in:
parent
10ed6a395a
commit
2e7db6a952
|
|
@ -11,6 +11,6 @@ FROM node:20-alpine
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=build /app/dist ./dist
|
COPY --from=build /app/dist ./dist
|
||||||
COPY server.js .
|
COPY server.js .
|
||||||
RUN npm install express
|
RUN npm install express@4
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
CMD ["node", "server.js"]
|
CMD ["node", "server.js"]
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ app.post('/api/chat/stream', async (req, res) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
// SPA fallback - all other routes serve index.html
|
// SPA fallback - all other routes serve index.html
|
||||||
app.get('/*', (req, res) => {
|
app.get('*', (req, res) => {
|
||||||
res.sendFile(path.join(__dirname, 'dist', 'index.html'));
|
res.sendFile(path.join(__dirname, 'dist', 'index.html'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue