Open utterances-bot opened 1 year ago
This approach that extending routes class with RouteConfig make dependencies injection didnt work.
for example
class MyRoutes extends RouteConfig {
private myController: MyController
constructor(app: express.Application, myController: MyController){
super(app, 'MyRoutes')
this.myController = myController
}
configureRoutes(){
THE this.myController will UNDEFINED here
}
}
any solution for this?
Implementing Basic Authentication using Express and Typescript
Do you use express for your backend and curious about building a basic auth using express and Typescript. let's implement express typescript basic auth with different patterns.
https://cloudnweb.dev/2021/05/express-typescript-basic-auth/