Skip to content

using dependency injection for API server, for cleaner code #277

@ZibanPirate

Description

@ZibanPirate

Is your feature request related to a problem? Please describe.
The code inside the api folder is a bit messy...

Describe the solution you'd like
One way to improve it, is to use one of the strategies of IoC, which is dependency injection.
since this is a Nodejs server, we can use an npm package to handle dependency injection, the library i recommend is: typedi

Describe alternatives you've considered
There are other way to improve it too, like using a framework on top of express (eg: Nest.js)

Additional context
N/a

Feature Branch : feat/cleaner-api
Feature PR : #283

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Released

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions