Services
Services are an important part of our framework and are designed so that they can be injected as a dependency.

Dependency injection
ZanobiJS is based on a design pattern known as dependency injection. Thanks to Awilix dependency container can be managed quickly, efficient and powerful.
import { Injectable } from "@zanobijs/common";
@Injectable()export class ServiceExample { constructor() {} getHello() { return "Hello ServiceExample"; }}
In the following example, we see that dependency is resolved within the constructor of a controller.
// Inject the service into the controllerconstructor(private sExample: ServiceExample) {}
Support us
ZanobiJS is an open source project licensed by MIT. It can grow thanks to the support of amazing people like you. If you want to join, read more here.