From eea82fee8fbab5bd12aa0f78c512c43882cc1e46 Mon Sep 17 00:00:00 2001 From: Nikita Melnikov Date: Thu, 3 Nov 2022 01:02:34 +0200 Subject: [PATCH] fixes --- .github/workflows/build.yml | 1 - src/backend/server.ts | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1994a91..41fa249 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,6 @@ on: env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} - IMAGE_NAME_TEST: ${{ fromJSON('[${{github.repository}}, ${{github.repository}}-stage]')[endsWith(github.ref, '/stage')] }} jobs: build: diff --git a/src/backend/server.ts b/src/backend/server.ts index c3331f4..2269aae 100644 --- a/src/backend/server.ts +++ b/src/backend/server.ts @@ -34,6 +34,7 @@ function createApp(): express.Express { */ // eslint-disable-next-line @typescript-eslint/naming-convention const __dirname = path.dirname(fileURLToPath(import.meta.url)); + const cwd = process.cwd(); const app = express(); const localConfig = appConfig.frontend; @@ -85,7 +86,10 @@ function createApp(): express.Express { app.use(express.static(path.join(__dirname, '../../public'))); if (appConfig.uploads.driver === 'local') { - app.use('/uploads', express.static(appConfig.uploads.local.path)); + const uploadsPath = path.join(cwd, appConfig.uploads.local.path); + + console.log(uploadsPath); + app.use('/uploads', express.static(uploadsPath)); } app.use('/favicon', express.static(downloadedFaviconFolder));