You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to set up tsyringe and play with it but seems I cannot make it work.
To Reproduce
import"reflect-metadata";import{container}from"tsyringe";importexpress,{Express,Request,Response}from'express';import{UserController}from'./src/application/controller/UserController';constapp: Express=express();constport=process.env.PORT||3000;app.get('/',(req: Request,res: Response)=>{constuser=container.resolve(UserController);constusers=user.getUsers()console.log(users);res.send('Typing script = type script');});app.listen(port,()=>{console.log(`⚡️[server]: Server is running at http://localhost:${port}`);});
Describe the bug
I was trying to set up tsyringe and play with it but seems I cannot make it work.
To Reproduce
UserController.ts
UserService.ts
tsconfig.json
package.json
Expected behavior
The controller should have been resolved.
Version:
4.7.0
The text was updated successfully, but these errors were encountered: