Skip to content

Commit d62479f

Browse files
committed
refactor: reorder getDocs call in bootstrap function
- Moved the getDocs function call to occur after setting the global prefix for better application initialization flow.
1 parent ccbb366 commit d62479f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ async function bootstrap(): Promise<void> {
6262

6363
const config = app.get(ConfigService);
6464

65-
await getDocs(app, config);
66-
6765
app.use(
6866
helmet({
6967
contentSecurityPolicy: {
@@ -98,6 +96,8 @@ async function bootstrap(): Promise<void> {
9896

9997
app.setGlobalPrefix(ROOT);
10098

99+
await getDocs(app, config);
100+
101101
app.enableCors({
102102
origin: isDevelopment() ? '*' : config.getOrThrow<string>('FRONT_END_DOMAIN'),
103103
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE',

0 commit comments

Comments
 (0)