@dibot/service
@dibot/service is a nodejs package that contain a simple interface call Service.
This interface is used by @dibot/dibot to manage various services.
How to create a service
import Service from '@dibot/service';
export default class MyService extends Service {
//MUST ALWAYS HAVE 'dibot' HAS FIRST PARAMETER
constructor(dibot) {
//The name will be used to manage the service in Dibot;
super('my_service_name', dibot);
}
start() {
//This method is called automatically by dibot's main process
//YOu may start you service here
}
stop() {
//Put here the code to properly stop your service
}
}
Building from source
Clone this repo , then from a command line
npm install #or yarn
npm run build #or yarn build