-
Notifications
You must be signed in to change notification settings - Fork 397
Closed
Description
As for me, having global state like this:
import "./SomeController" // import result affects as a global variable
let app = createExpressServer() // express server implicitly use "SomeController"
is not a good idea, because is handles like global variables. For example, this requries to clear metadata storage before each functional test. I think it could be better, if you made this opt-in, and add ability to explicit pass controllers, interceptors and other citizens to createExpressServer:
import SomeController from "./SomeController"
import SomeInterceptor from "./SomeInterceptor"
let app = createExpressServer(
SomeController,
SomeInterceptor
)
or somehow else. What do you think about it?
FunctionalWorm and MichalLytek
Metadata
Metadata
Assignees
Labels
No labels