From 663d842ae5e45eef689be05512b353cca15e0eb4 Mon Sep 17 00:00:00 2001 From: Aleksi Lassila Date: Mon, 17 Jun 2024 00:50:19 +0300 Subject: [PATCH] build: Fix issue with production build not working --- README.md | 2 +- backend/package.json | 2 +- backend/src/app.module.ts | 2 +- src/lib/profile-pictures.ts | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7d9c000..9015bf6 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ services: `npm install --prefix backend`\ `npm run build` 4. Start the app:\ - `node backend/dist/main` + `node backend/dist/src/main` #### Reiverr will be accessible via port 9494 by default. diff --git a/backend/package.json b/backend/package.json index 67a9b9d..b6e2e0c 100644 --- a/backend/package.json +++ b/backend/package.json @@ -11,7 +11,7 @@ "start": "nest start", "start:dev": "nest start --watch", "start:debug": "nest start --debug --watch", - "start:prod": "node dist/main", + "start:prod": "node dist/src/main", "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", "test": "jest", "test:watch": "jest --watch", diff --git a/backend/src/app.module.ts b/backend/src/app.module.ts index aecb820..1b2bc20 100644 --- a/backend/src/app.module.ts +++ b/backend/src/app.module.ts @@ -13,7 +13,7 @@ import { join } from 'path'; UsersModule, AuthModule, ServeStaticModule.forRoot({ - rootPath: join(__dirname, 'dist'), + rootPath: join(__dirname, '../dist'), }), ], controllers: [AppController], diff --git a/src/lib/profile-pictures.ts b/src/lib/profile-pictures.ts index c399332..1247eaa 100644 --- a/src/lib/profile-pictures.ts +++ b/src/lib/profile-pictures.ts @@ -1,5 +1,6 @@ export function getRandomProfilePicture() { const pictures = Object.keys(profilePictures); + // @ts-ignore return profilePictures[pictures[Math.floor(Math.random() * pictures.length)]]; }