#main.ts exports

6 messages · Page 1 of 1 (latest)

unborn igloo
#

Is it possible to have my main.ts file provide an export (whether default or named) that is executed when nest start is ran? I would prefer this over the default implementation of Nest CLI executing the entire main.ts file.

coarse grove
#

nop

#

the CLI will use some entry file

#

regardless of its content

#

you could have something like this:

// main.ts
import bootstrap from './foo'
bootstrap()
// foo.ts
export default function bootstrap() {}
unborn igloo
#

yeah, that's what I ended up doing