harnosoft-kernel
v0.0.4
Published
- configService: [] - loggerService: [] - jobsSchedulerService: [loggerService] - expressService: [loggerService] - mongoDBService: [loggerService] - errorHandlerService: [loggerService] - httpClientService: [] Internal kernel services (cannot have depend
Downloads
4
Readme
Harnosoft kernel
Services dependencies
- configService: []
- loggerService: []
- jobsSchedulerService: [loggerService]
- expressService: [loggerService]
- mongoDBService: [loggerService]
- errorHandlerService: [loggerService]
- httpClientService: [] Internal kernel services (cannot have dependencies): [configService, loggerService]
File naming conventions
.service. - files that contain classes that would become services
.class. - files that contain classes that are used in other classes
.managment.- files that contain classes(services) that manage some internal data
.model. - files that contain services that manage data in databases
.test. - files that contain tests
Right now this kernel has this features:
- Express service.It uses "Express" to do some action on particular port
- Jobs schedule service.It uses "Node Schedule" to create some code that should be executed at some period of time
- Config service.Right now it can be used to read some yaml file, but in the future this service will have support of other popular types like JSON
- MongoDB.It manages connection to some mongoDB database using mongoose
Usage and installastion
To install type npm i harnosoft-kernel
.
To use our kernel you should require it require("harnosoft-kernel")
and it will return class.
To register new service you should use Kernel's method registerService(name,service)
,which takes 2 arguments: name of service and class.
To get service you could use getter of Kernel,called services.This will return object with method get(name)
.If you call it with name of service as argument ,it will return instance of this service.