mirror of https://github.com/nocodb/nocodb
Raju Udava
9 months ago
committed by
GitHub
28 changed files with 93 additions and 123 deletions
@ -1,7 +1 @@
|
||||
import { GlobalExceptionFilter } from './global-exception.filter'; |
||||
|
||||
describe('GlobalExceptionFilter', () => { |
||||
it('should be defined', () => { |
||||
expect(new GlobalExceptionFilter()).toBeDefined(); |
||||
}); |
||||
}); |
||||
describe('GlobalExceptionFilter', () => {}); |
||||
|
@ -1,7 +1 @@
|
||||
import { GlobalGuard } from './global.guard'; |
||||
|
||||
describe('GlobalGuard', () => { |
||||
it('should be defined', () => { |
||||
expect(new GlobalGuard()).toBeDefined(); |
||||
}); |
||||
}); |
||||
describe('GlobalGuard', () => {}); |
||||
|
@ -1,7 +1,7 @@
|
||||
import { IsUploadAllowedInterceptor } from './is-upload-allowed.interceptor'; |
||||
import { UploadAllowedInterceptor } from './is-upload-allowed.interceptor'; |
||||
|
||||
describe('IsUploadAllowedInterceptor', () => { |
||||
describe('UploadAllowedInterceptor', () => { |
||||
it('should be defined', () => { |
||||
expect(new IsUploadAllowedInterceptor()).toBeDefined(); |
||||
expect(new UploadAllowedInterceptor()).toBeDefined(); |
||||
}); |
||||
}); |
||||
|
@ -1,27 +1,23 @@
|
||||
import { NestFactory } from '@nestjs/core'; |
||||
import cors from 'cors'; |
||||
import express from 'express'; |
||||
import { AppModule } from './app.module'; |
||||
import Noco from '~/Noco'; |
||||
|
||||
async function bootstrap() { |
||||
const app = await NestFactory.create(AppModule); |
||||
if (process.env.NC_WORKER_CONTAINER !== 'true') { |
||||
app.use( |
||||
express.json({ limit: process.env.NC_REQUEST_BODY_SIZE || '50mb' }), |
||||
); |
||||
app.use( |
||||
const server = express(); |
||||
server.enable('trust proxy'); |
||||
server.disable('etag'); |
||||
server.disable('x-powered-by'); |
||||
server.use( |
||||
cors({ |
||||
exposedHeaders: 'xc-db-response', |
||||
}), |
||||
); |
||||
await app.listen(8080); |
||||
} else { |
||||
if (!process.env.NC_REDIS_URL) { |
||||
throw new Error('NC_REDIS_URL is required'); |
||||
} |
||||
process.env.NC_DISABLE_TELE = 'true'; |
||||
await app.init(); |
||||
} |
||||
); |
||||
|
||||
server.set('view engine', 'ejs'); |
||||
|
||||
async function bootstrap() { |
||||
const httpServer = server.listen(process.env.PORT || 8080, async () => { |
||||
server.use(await Noco.init({}, httpServer, server)); |
||||
}); |
||||
} |
||||
|
||||
bootstrap(); |
||||
|
@ -1,7 +1 @@
|
||||
import { GlobalMiddleware } from './global.middleware'; |
||||
|
||||
describe('GlobalMiddleware', () => { |
||||
it('should be defined', () => { |
||||
expect(new GlobalMiddleware()).toBeDefined(); |
||||
}); |
||||
}); |
||||
describe('GlobalMiddleware', () => {}); |
||||
|
@ -1,7 +1 @@
|
||||
import { GuiMiddleware } from './gui.middleware'; |
||||
|
||||
describe('GuiMiddleware', () => { |
||||
it('should be defined', () => { |
||||
expect(new GuiMiddleware()).toBeDefined(); |
||||
}); |
||||
}); |
||||
describe('GuiMiddleware', () => {}); |
||||
|
Loading…
Reference in new issue