m-salman-afzal / dependency-injector-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dependency-injector-example

The purpose of this project is to display the usage of dependency injection with the following 3 tools:

I've written an article on detailing on what is Dependency Injection Principle and how to implement it.

Check it out here!

How to

  1. Clone the repo
git clone https://github.com/muhammadsalmanafzal/dependency-injector-example.git
  1. Install npm modules
npm i
  1. Create .env file. This can be similar to .env.example
  2. Run the server
npm run dev
  1. Now you can either send a GET request to the server, where you need to replace typedi with inversify or tsyringe to see the difference:
http://localhost:8080/robot/typedi

About

License:MIT License


Languages

Language:TypeScript 100.0%