@@ -10,28 +10,20 @@ const baseUrl = `${protocol}://${host}:${port}/uma`;
1010const rootDir = path . join ( __dirname , '../' ) ;
1111
1212export const launch : ( ) => Promise < void > = async ( ) => {
13-
14- const variables : Record < string , any > = { } ;
13+ const variables : Record < string , unknown > = { } ;
1514
1615 variables [ 'urn:uma:variables:port' ] = port ;
17- variables [ 'urn:uma:variables:host' ] = host ;
18- variables [ 'urn:uma:variables:protocol' ] = protocol ;
1916 variables [ 'urn:uma:variables:baseUrl' ] = baseUrl ;
2017
2118 variables [ 'urn:uma:variables:policyDir' ] = path . join ( rootDir , './config/rules/policy' ) ;
22- variables [ 'urn:uma:variables:rulesDir' ] = path . join ( rootDir , './config/rules/n3' ) ;
2319 variables [ 'urn:uma:variables:eyePath' ] = 'eye' ;
2420
25- variables [ 'urn:uma:variables:mainModulePath' ] = rootDir ;
26- variables [ 'urn:uma:variables:customConfigPath' ] = path . join ( rootDir , './config/default.json' ) ;
27-
28- const mainModulePath = variables [ 'urn:uma:variables:mainModulePath' ] ;
29- const configPath = variables [ 'urn:uma:variables:customConfigPath' ] ;
21+ const configPath = path . join ( rootDir , './config/default.json' ) ;
3022
3123 setGlobalLoggerFactory ( new WinstonLoggerFactory ( 'info' ) ) ;
3224
3325 const manager = await ComponentsManager . build ( {
34- mainModulePath,
26+ mainModulePath : rootDir ,
3527 logLevel : 'silly' ,
3628 typeChecking : false ,
3729 } ) ;
@@ -40,7 +32,6 @@ export const launch: () => Promise<void> = async () => {
4032
4133 const umaServer : ServerInitializer = await manager . instantiate ( 'urn:uma:default:NodeHttpServer' , { variables} ) ;
4234 await umaServer . handleSafe ( ) ;
43-
4435} ;
4536
4637launch ( ) ;
0 commit comments