diff --git a/packages/pinus/lib/application.ts b/packages/pinus/lib/application.ts index 953160b88..2a3c850d5 100644 --- a/packages/pinus/lib/application.ts +++ b/packages/pinus/lib/application.ts @@ -180,7 +180,7 @@ export class Application { */ init(opts ?: ApplicationOptions) { opts = opts || {}; - let base = opts.base || process.cwd(); + let base = opts.base || path.dirname(require.main.filename); this.set(Constants.RESERVED.BASE, base); this.base = base;