diff --git a/package.json b/package.json index eb87bb8..3884020 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@extollo/lib", - "version": "0.10.1", + "version": "0.10.2", "description": "The framework library that lifts up your code.", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/service/Routing.ts b/src/service/Routing.ts index 61d3120..9afa269 100644 --- a/src/service/Routing.ts +++ b/src/service/Routing.ts @@ -12,6 +12,7 @@ import {PackageDiscovered} from '../support/PackageDiscovered' import {staticServer} from '../http/servers/static' import {Bus} from '../support/bus' import {RequestLocalStorage} from '../http/RequestLocalStorage' +import {env} from '../lifecycle/Application' /** * Application unit that loads the various route files from `app/http/routes` and pre-compiles the route handlers. @@ -38,8 +39,9 @@ export class Routing extends Unit { this.logging.verbose('Registering @extollo view engine namespace.') engine.registerNamespace('extollo', lib().concat('resources', 'views')) + const suffix = `.routes${env('NODE_SCRIPT_SUFFIX', '.js')}` for await ( const entry of this.path.walk() ) { - if ( !entry.endsWith('.routes.js') ) { + if ( !entry.endsWith(suffix) ) { this.logging.debug(`Skipping routes file with invalid suffix: ${entry}`) continue }