Browse Source

fix: serve nc-gui

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5444/head
Pranav C 2 years ago
parent
commit
f2eb2300f2
  1. 6
      packages/nocodb-nest/src/nocobuild.ts

6
packages/nocodb-nest/src/nocobuild.ts

@ -1,11 +1,17 @@
import { NestFactory } from '@nestjs/core';
import express from 'express';
import { AppModule } from './app.module';
import NcToolGui from 'nc-lib-gui'
export default async function (app = express()) {
const nestApp = await NestFactory.create(AppModule);
await nestApp.init();
const dashboardPath = process.env.NC_DASHBOARD_URL || '/dashboard';
app.use(NcToolGui.expressMiddleware(dashboardPath));
app.get('/', (_req, res) =>
res.redirect(dashboardPath)
);
app.use(nestApp.getHttpAdapter().getInstance());
return app;

Loading…
Cancel
Save