Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 1.2 KB

IOC.md

File metadata and controls

31 lines (20 loc) · 1.2 KB

npm version standard-readme compliant

augejs is a progressive Node.js framework for building applications.

🌟 Star us on GitHub — it helps! 👏

https://github.com/augejs/augejs.github.io

Inversion of control (IoC) container

Inversion of Control is a common phenomenon that you come across when extending frameworks. Indeed it's often seen as a defining characteristic of a framework. --- Martin Fowler

augejs is on top of InversifyJS

Usage

import { Module, Inject } from '@augejs/core';
import { AXIOS_IDENTIFIER, AxiosInstance } from '@augejs/axios';
@Module()
class AppModule {
  @Inject(AXIOS_IDENTIFIER)
  httpService!: AxiosInstance;
}

We use the @Inject decorator to inject the instance.