Documentation / @zerotal/core / helpers / basePath
Function: basePath()
basePath(...
segments):string
Defined in: helpers/index.ts:41
Resolve a path relative to the application root (process.cwd()).
Use in bootstrap/app.ts when declaring route files or directories so paths
are always resolved from the project root rather than the calling file's
directory.
Parameters
segments
...string[]
Returns
string
Example
// bootstrap/app.ts
Application.create({ providers })
.routing({ web: basePath('routes/web.ts') })
.fileBasedRouting({ web: basePath('app/routes') });