Configuration: services.yml - reactor-X/kyrin-express GitHub Wiki

You can declare universally available services here. Services are typescript classes that contain methods. Instance of a class can be obtained by calling get(service_name) from the container. Services are stored in src/services.

Container is accessible inside services. Just declare a public property container=null and kyrin will automatically inject the container instance in your service.

Structure

The services are declared by name as keys. Below is an example of a service declaration.

services.yml

say-hello:
    class: Demo/demo
...