mirror of
https://github.com/fromchat-messenger/web.git
synced 2026-09-22 19:15:08 +03:00
Fix TypeScript
This commit is contained in:
@@ -21,12 +21,12 @@ COPY deployment/frontend/package.json .
|
||||
RUN --mount=type=cache,target=/root/.npm \
|
||||
npm install
|
||||
|
||||
# 2.2. Build
|
||||
RUN npm run build
|
||||
|
||||
# 2.2. Copy the code
|
||||
COPY deployment/frontend/ .
|
||||
|
||||
# 2.3. Build
|
||||
RUN npm run build
|
||||
|
||||
|
||||
# 3. Put it all together
|
||||
FROM node:24-slim
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"main": "server.js",
|
||||
"scripts": {
|
||||
"start": "ts-node server.ts",
|
||||
"build": "tsc",
|
||||
"build": "tsc -b",
|
||||
"start:prod": "node dist/server.js"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -19,7 +19,7 @@ app.use('/api', createProxyMiddleware({
|
||||
app.use(express.static(resolve(filePath)));
|
||||
|
||||
// SPA routing - catch all handler for client-side routing
|
||||
app.get('*', (_req, res) => {
|
||||
app.use((_req, res) => {
|
||||
res.sendFile(resolve(filePath, 'index.html'));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user