File tree Expand file tree Collapse file tree 4 files changed +82
-0
lines changed Expand file tree Collapse file tree 4 files changed +82
-0
lines changed Original file line number Diff line number Diff line change
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
2
+ import { Document , Model } from 'mongoose' ;
3
+ import { IUser } from '../../interfaces/IUser' ;
4
+ declare global {
5
+ namespace Express {
6
+ export interface Request {
7
+ currentUser : IUser & Document ;
8
+ token : string ;
9
+ }
10
+ }
11
+
12
+ namespace Models {
13
+ export type UserModel = Model < IUser & Document > ;
14
+ }
15
+ }
Original file line number Diff line number Diff line change
1
+ declare namespace NodeJS {
2
+ interface Global {
3
+ __basedir : string ;
4
+ }
5
+ }
Original file line number Diff line number Diff line change
1
+ import * as dotenv from 'dotenv' ;
2
+ const envFound = dotenv . config ( ) ;
3
+ if ( envFound . error ) {
4
+ throw new Error ( envFound . error . toString ( ) )
5
+ }
6
+
1
7
export const environment = {
2
8
production : true ,
9
+ port : parseInt ( process . env . PORT , 10 ) ,
10
+ databaseURL : process . env . MONGODB_URI ,
11
+ appSecret : process . env . SECRET ,
12
+ api : {
13
+ prefix_v1 : '/api/v1' ,
14
+ } ,
15
+ OAuth2 : {
16
+ clientId : process . env . CLIENT_ID ,
17
+ clientSecret : process . env . CLIENT_SECRET ,
18
+ } ,
19
+ logs : {
20
+ level : process . env . LOG_LEVEL || 'silly' ,
21
+ } ,
22
+ /**
23
+ * Agenda.js stuff
24
+ */
25
+ agenda : {
26
+ dbCollection : process . env . AGENDA_DB_COLLECTION ,
27
+ pooltime : process . env . AGENDA_POOL_TIME ,
28
+ concurrency : parseInt ( process . env . AGENDA_CONCURRENCY , 10 ) ,
29
+ } ,
30
+ agendash : {
31
+ user : 'admin' ,
32
+ password : 'admin' ,
33
+ } ,
3
34
} ;
Original file line number Diff line number Diff line change
1
+ import * as dotenv from 'dotenv' ;
2
+ const envFound = dotenv . config ( ) ;
3
+ if ( envFound . error ) {
4
+ throw new Error ( envFound . error . toString ( ) )
5
+ }
6
+
1
7
export const environment = {
2
8
production : false ,
9
+ port : parseInt ( process . env . PORT , 10 ) ,
10
+ databaseURL : process . env . MONGODB_URI ,
11
+ appSecret : process . env . SECRET ,
12
+ api : {
13
+ prefix_v1 : '/api/v1' ,
14
+ } ,
15
+ OAuth2 : {
16
+ clientId : process . env . CLIENT_ID ,
17
+ clientSecret : process . env . CLIENT_SECRET ,
18
+ } ,
19
+ logs : {
20
+ level : process . env . LOG_LEVEL || 'silly' ,
21
+ } ,
22
+ /**
23
+ * Agenda.js stuff
24
+ */
25
+ agenda : {
26
+ dbCollection : process . env . AGENDA_DB_COLLECTION ,
27
+ pooltime : process . env . AGENDA_POOL_TIME ,
28
+ concurrency : parseInt ( process . env . AGENDA_CONCURRENCY , 10 ) ,
29
+ } ,
30
+ agendash : {
31
+ user : 'admin' ,
32
+ password : 'admin' ,
33
+ } ,
3
34
} ;
You can’t perform that action at this time.
0 commit comments