0.0.4 • Published 5 years ago

harnosoft-kernel v0.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

Harnosoft kernel

Services dependencies

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.