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', () => {}); |
||||||
|
|
||||||
describe('GlobalExceptionFilter', () => { |
|
||||||
it('should be defined', () => { |
|
||||||
expect(new GlobalExceptionFilter()).toBeDefined(); |
|
||||||
}); |
|
||||||
}); |
|
||||||
|
@ -1,7 +1 @@ |
|||||||
import { GlobalGuard } from './global.guard'; |
describe('GlobalGuard', () => {}); |
||||||
|
|
||||||
describe('GlobalGuard', () => { |
|
||||||
it('should be defined', () => { |
|
||||||
expect(new GlobalGuard()).toBeDefined(); |
|
||||||
}); |
|
||||||
}); |
|
||||||
|
@ -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', () => { |
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 cors from 'cors'; |
||||||
import express from 'express'; |
import express from 'express'; |
||||||
import { AppModule } from './app.module'; |
import Noco from '~/Noco'; |
||||||
|
|
||||||
async function bootstrap() { |
const server = express(); |
||||||
const app = await NestFactory.create(AppModule); |
server.enable('trust proxy'); |
||||||
if (process.env.NC_WORKER_CONTAINER !== 'true') { |
server.disable('etag'); |
||||||
app.use( |
server.disable('x-powered-by'); |
||||||
express.json({ limit: process.env.NC_REQUEST_BODY_SIZE || '50mb' }), |
server.use( |
||||||
); |
|
||||||
app.use( |
|
||||||
cors({ |
cors({ |
||||||
exposedHeaders: 'xc-db-response', |
exposedHeaders: 'xc-db-response', |
||||||
}), |
}), |
||||||
); |
); |
||||||
await app.listen(8080); |
|
||||||
} else { |
server.set('view engine', 'ejs'); |
||||||
if (!process.env.NC_REDIS_URL) { |
|
||||||
throw new Error('NC_REDIS_URL is required'); |
async function bootstrap() { |
||||||
} |
const httpServer = server.listen(process.env.PORT || 8080, async () => { |
||||||
process.env.NC_DISABLE_TELE = 'true'; |
server.use(await Noco.init({}, httpServer, server)); |
||||||
await app.init(); |
}); |
||||||
} |
|
||||||
} |
} |
||||||
|
|
||||||
bootstrap(); |
bootstrap(); |
||||||
|
@ -1,7 +1 @@ |
|||||||
import { GlobalMiddleware } from './global.middleware'; |
describe('GlobalMiddleware', () => {}); |
||||||
|
|
||||||
describe('GlobalMiddleware', () => { |
|
||||||
it('should be defined', () => { |
|
||||||
expect(new GlobalMiddleware()).toBeDefined(); |
|
||||||
}); |
|
||||||
}); |
|
||||||
|
@ -1,7 +1 @@ |
|||||||
import { GuiMiddleware } from './gui.middleware'; |
describe('GuiMiddleware', () => {}); |
||||||
|
|
||||||
describe('GuiMiddleware', () => { |
|
||||||
it('should be defined', () => { |
|
||||||
expect(new GuiMiddleware()).toBeDefined(); |
|
||||||
}); |
|
||||||
}); |
|
||||||
|
Loading…
Reference in new issue