Axios (Inversion of control)
ODG Message for axios Inversion of control 📦!

Table of Contents
🎇 Benefits
- 🚀 Speed performance Inversion of control
- 🚨 Code Quality
- 🎇 Use Interface
- 🧪 Teste with 100% coverage
📗 Libraries
📁 Dependencies
⏩ Get Started
🔘 Installation
yarn add @odg/message @odg/axios axios
💻 Usage
For simple example usage, you can use Inversify for Dependency Injection
import { type MessageInterface, type MessageResponse } from "@odg/message";
class Test {
public constructor(
private readonly requester: MessageInterface
) {
}
public async example(): Promise<MessageResponse<
unknown,
Record<string, unknown>,
>> {
return this.requester.request({
url: "https://api.github.com/users/ODGodinho",
});
}
}
const test = new Test(new AxiosMessage({
}));
console.log(await test.example());
📍 Start Project
First install dependencies with the following command
yarn install
npm install
📨 Build and Run
To build the project, you can use the following command
if you change files, you need to run yarn build
and yarn start
again
yarn build && yarn start
yarn dev
🧪 Teste Code
To Test execute this command
yarn test
yarn test:watch