From 3dfe2e41c432b4e5a3b22a2433f88b974c01c6d4 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Wed, 24 May 2023 17:55:39 +0800 Subject: [PATCH] fix(nocodb): add static public directory --- packages/nocodb/src/Noco.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/nocodb/src/Noco.ts b/packages/nocodb/src/Noco.ts index 942ce717f6..1b93161bb7 100644 --- a/packages/nocodb/src/Noco.ts +++ b/packages/nocodb/src/Noco.ts @@ -1,5 +1,6 @@ import Sentry, { Handlers } from '@sentry/node'; import { Logger } from '@nestjs/common'; +import path from 'path'; import { NestFactory } from '@nestjs/core'; import clear from 'clear'; import * as express from 'express'; @@ -122,6 +123,7 @@ export default class Noco { const dashboardPath = process.env.NC_DASHBOARD_URL || '/dashboard'; server.use(NcToolGui.expressMiddleware(dashboardPath)); + server.use(express.static(path.join(__dirname, 'public'))); server.get('/', (_req, res) => res.redirect(dashboardPath)); this.initSentryErrorHandler(server);