Prxima Service Control Manager
[ status: partial ][ progress ███------- 30%] '
Próxima Service Manager, run all-in-one. Simple and silent
Summary
- Introduction
- Getting Start
- Recommendations
- Specifications\
4.1. Add Service,
options\ 4.2. Status - Features
Introduction
Robust projects today require a variety of micro-services, customer services, and other resources running on our machines before we can proceed with development.
With that in mind the next team develops this little service manager. Easy to use, simple to set up.
Getting Start
Install this package
npm i -D @prxima/services-managercreate file serve-manager.js on root npm project
const { ServicesManager } = required("@prxima/services-manager");
new ServicesManager()
.addService(
"Client Service" /* service display name */,
"npm run client" /* shell command to run*/,
(data, info) => {
return data.indexOf("success") > -1 ? 1 : 0;
} /* callback to read out command and return status, 0 = offline and 1 = online */
)
.addService("Server Service", "npm run server", data =>
data.indexOf("listening") > -1 ? 1 : 0
);add script into package.json
{
...
scripts:[
...
"start": "node ./serve-manager.js",
...
],
...
}now, time to code! 🎧💻📦
npm run startSpecifications
// TODO:
addService, options
Status
Status code is used to inform the manager at what stage of execution of the command the service is in; Status is obtained by service callback or message combination in options
-2; // Error and require re-boot command
-1; // Error and await
0; // service offline and await
1; // service online and activeFeatures and North
- <input checked="" disabled="" type="checkbox">
- Run shell commands in parallel; v1.0.x \
- <input checked="" disabled="" type="checkbox">
- Associate callBack to status service; v1.1.x \
- <input checked="" disabled="" type="checkbox">
- Colored notification whit all services status; v1.0.x\
- <input checked="" disabled="" type="checkbox">
- Auto status math by partial message definition; v1.1.x\
- <input disabled="" type="checkbox">
- Reload command whit specified error; v1.2.x\
- <input disabled="" type="checkbox">
- API Service;\
- <input disabled="" type="checkbox">
- Query Services info;\
- <input disabled="" type="checkbox">
- Query Status services;\
- <input disabled="" type="checkbox">
- Web GUI Client;\
Powered with ❤👌