File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,6 +54,9 @@ Note that the API processes must be stopped and run again for new code to be eff
5454| DB_AUTH_PASSWORD | string | db password |
5555| DB_AUTHSOURCE | string | authentication db |
5656| LISTEN_PORT | number | port to query the API |
57+ | HOST | string | forced hostname |
58+ | PUBLIC_DIR | string | path to public directory |
59+
5760
5861### config.yml file
5962
Original file line number Diff line number Diff line change @@ -64,6 +64,12 @@ app.use(paginate.middleware(DEFAULT_LIMIT, MAX_LIMIT));
6464// Parse POST request bodies
6565app . use ( express . json ( ) ) ;
6666
67+ // Set a directory for public files, if required
68+ const PUBLIC_DIR = process . env . PUBLIC_DIR ;
69+ console . log ( PUBLIC_DIR ) ;
70+ if ( PUBLIC_DIR )
71+ app . use ( '/public' , express . static ( PUBLIC_DIR ) ) ;
72+
6773// Root routes
6874app . get ( '/' , ( _ , res ) => res . json ( { 'api types' : [ 'rest' ] } ) ) ;
6975app . get ( '/rest' , ( _ , res ) =>
You can’t perform that action at this time.
0 commit comments