Browse Source

fix(nocodb): add static public directory

pull/5721/head
Wing-Kam Wong 1 year ago
parent
commit
3dfe2e41c4
  1. 2
      packages/nocodb/src/Noco.ts

2
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);

Loading…
Cancel
Save