2.0.9 • Published 3 years ago

@david.uhlir/services v2.0.9

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Services util for server applications

This utility is some kind of dependency injection, but it's really simple. It's provided by decorators, and it's assign reference to instance of service to variable. To initialize your context (where services will be initialized) just call something. like this:

import { ServicesContext } from '@david.uhlir/services';

ServicesContext.initialize([
    new TestService1(),
    new TestService2(),
]);

Usage

import { Service } from '@david.uhlir/services';
import { TestService2 } from './TestService2';

export class TestService1 extends Service {
    @ServicesContext.inject(TestService2)
    protected service: TestService2;
}

ISC

2.0.3

3 years ago

2.0.2

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.7

3 years ago

2.0.6

3 years ago

2.0.9

3 years ago

2.0.8

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.5

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago