This is a simple project written in vanilla JS TypeScript for learning how to work with dependencies using an IoC container.
For passing the practical part, you need to update the project using IoC Container. IoC Container is already created, so don’t worry just use it.
The project contains three services: Logger, HTTP, and Users.
Loggerdoesn’t have any dependencies.HTTPservice has Logger and config as dependencies.Usersclass depends on HTTP and config.
To complete the task, you have to perform the following steps:
- fork this repo;
- check ioc-lite library documentation;
- rewrite project to automate manage dependencies with IoC Container;
- create a PR in your own repo and send the link to the course professor;
Hints:
- there is already created ioc file;
- you need to specify the static property
$injectin classes to define dependencies; - again, read the documentation;
- change the code only in the
srcfolder; - in case any questions please reach out to Nazar Bulych;
$ yarn install$ yarn start- Navigate to localhost:8080 (you can change the port in
config.json)