File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ const security = require('./security.js');
66
77const SCRIPT_OPTIONS = { timeout : 5000 } ;
88const EMPTY_CONTEXT = Object . freeze ( { } ) ;
9- const DIRS = [ 'static' , 'domain' , 'api' ] ;
109
1110class Application extends events . EventEmitter {
1211 constructor ( ) {
@@ -15,14 +14,16 @@ class Application extends events.EventEmitter {
1514 this . namespaces = [ 'db' ] ;
1615 this . path = process . cwd ( ) ;
1716 this . staticPath = path . join ( this . path , 'static' ) ;
17+ this . api = new Map ( ) ;
18+ this . domain = new Map ( ) ;
19+ this . static = new Map ( ) ;
1820 }
1921
2022 async init ( ) {
2123 this . createSandbox ( ) ;
22- for ( const name of DIRS ) {
23- this [ name ] = new Map ( ) ;
24- await this . loadPlace ( name , path . join ( this . path , name ) ) ;
25- }
24+ await this . loadPlace ( 'api' , path . join ( this . path , 'api' ) ) ;
25+ await this . loadPlace ( 'domain' , path . join ( this . path , 'domain' ) ) ;
26+ await this . loadPlace ( 'static' , path . join ( this . path , 'static' ) ) ;
2627 }
2728
2829 async shutdown ( ) {
You can’t perform that action at this time.
0 commit comments