aboutsummaryrefslogtreecommitdiffstats
path: root/config/app.ts
diff options
context:
space:
mode:
Diffstat (limited to 'config/app.ts')
-rw-r--r--config/app.ts33
1 files changed, 17 insertions, 16 deletions
diff --git a/config/app.ts b/config/app.ts
index 135f20f..5575bc1 100644
--- a/config/app.ts
+++ b/config/app.ts
@@ -5,12 +5,12 @@
5 * file. 5 * file.
6 */ 6 */
7 7
8import proxyAddr from 'proxy-addr' 8import proxyAddr from 'proxy-addr';
9import env from '#start/env' 9import env from '#start/env';
10import { ProfilerConfig } from '@ioc:Adonis/Core/Profiler' 10import { ProfilerConfig } from '@ioc:Adonis/Core/Profiler';
11import { LoggerConfig } from '@adonisjs/core/types/logger' 11import { LoggerConfig } from '@adonisjs/core/types/logger';
12import { ValidatorConfig } from '@adonisjs/validator/types' 12import { ValidatorConfig } from '@adonisjs/validator/types';
13import { defineConfig } from '@adonisjs/core/http' 13import { defineConfig } from '@adonisjs/core/http';
14 14
15/* 15/*
16|-------------------------------------------------------------------------- 16|--------------------------------------------------------------------------
@@ -25,17 +25,18 @@ import { defineConfig } from '@adonisjs/core/http'
25| be decrypted. 25| be decrypted.
26| 26|
27*/ 27*/
28export const appKey: string = env.get('APP_KEY') 28export const appKey: string = env.get('APP_KEY');
29 29
30export const url: string = env.get('APP_URL') 30export const url: string = env.get('APP_URL');
31 31
32// TODO: this is parsed as string to be coherent with the previous version of the code we add (before migrating to AdonisJS 5) 32// TODO: this is parsed as string to be coherent with the previous version of the code we add (before migrating to AdonisJS 5)
33export const isRegistrationEnabled: string = env.get('IS_REGISTRATION_ENABLED') 33export const isRegistrationEnabled: string = env.get('IS_REGISTRATION_ENABLED');
34export const connectWithFranz: string = env.get('CONNECT_WITH_FRANZ') 34export const connectWithFranz: string = env.get('CONNECT_WITH_FRANZ');
35export const isCreationEnabled: string = env.get('IS_CREATION_ENABLED') 35export const isCreationEnabled: string = env.get('IS_CREATION_ENABLED');
36export const jwtUsePEM: boolean = 36export const jwtUsePEM: boolean =
37 env.get('JWT_USE_PEM', false) || 37 env.get('JWT_USE_PEM', false) ||
38 (env.get('JWT_PUBLIC_KEY', '') !== '' && env.get('JWT_PRIVATE_KEY', '') !== '') 38 (env.get('JWT_PUBLIC_KEY', '') !== '' &&
39 env.get('JWT_PRIVATE_KEY', '') !== '');
39/* 40/*
40|-------------------------------------------------------------------------- 41|--------------------------------------------------------------------------
41| Http server configuration 42| Http server configuration
@@ -136,7 +137,7 @@ export const http = defineConfig({
136 | 137 |
137 */ 138 */
138 forceContentNegotiationTo: 'application/json', 139 forceContentNegotiationTo: 'application/json',
139}) 140});
140 141
141/* 142/*
142|-------------------------------------------------------------------------- 143|--------------------------------------------------------------------------
@@ -190,7 +191,7 @@ export const logger: LoggerConfig = {
190 | 191 |
191 */ 192 */
192 prettyPrint: env.get('NODE_ENV') === 'development', 193 prettyPrint: env.get('NODE_ENV') === 'development',
193} 194};
194 195
195/* 196/*
196|-------------------------------------------------------------------------- 197|--------------------------------------------------------------------------
@@ -229,7 +230,7 @@ export const profiler: ProfilerConfig = {
229 | 230 |
230 */ 231 */
231 whitelist: [], 232 whitelist: [],
232} 233};
233 234
234/* 235/*
235|-------------------------------------------------------------------------- 236|--------------------------------------------------------------------------
@@ -240,4 +241,4 @@ export const profiler: ProfilerConfig = {
240| to the default config https://git.io/JT0WE 241| to the default config https://git.io/JT0WE
241| 242|
242*/ 243*/
243export const validator: ValidatorConfig = {} 244export const validator: ValidatorConfig = {};