-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnestia.config.ts
55 lines (53 loc) · 1.32 KB
/
nestia.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import { INestiaConfig } from '@nestia/sdk';
import { NestFactory } from '@nestjs/core';
import { AppModule } from './src/app.module';
import { ConfigService } from '@nestjs/config';
import * as path from 'path';
import 'dotenv/config';
const env = new ConfigService();
const NESTIA_CONFIG: INestiaConfig = {
// input: 'src/**/*.controller.ts',
input: async () => {
const app = await NestFactory.create(AppModule);
// app.setGlobalPrefix("api");
// app.enableVersioning({
// type: VersioningType.URI,
// prefix: "v",
// })
return app;
},
output: 'src/api',
clone: true,
assert: true,
simulate: true,
propagate: true,
e2e: 'test/e2e',
distribute: 'packages/api',
swagger: {
openapi: '3.1',
output: path.join(process.env.PWD as string, `swagger.json`),
security: {
bearer: {
type: 'apiKey',
name: 'Authorization',
in: 'header',
},
},
servers: [
{
url: `http://localhost:${env.get('APP_PORT')}`,
description: 'Local Server',
},
{
url: `http://h4gwg4kkw4kww80o8cc8k0s8.118.36.207.199.sslip.io`,
description: 'Dev Server',
},
{
url: `https://api.galglmoney.com`,
description: 'Prod Server',
},
],
beautify: true,
},
};
export default NESTIA_CONFIG;