启动和控制 NodeJS 进程 Process-watcher

码农软件 · 软件分类 · Node.js 扩展 · 2019-04-14 18:12:12

软件介绍

Process-watcher 能够启动和控制 NodeJS 进程的工具。

代码示例:

var watcher = require('process-watcher');

/*
 * Dummy metric monitoring object.
 */
var watcher_metric = {
    /**
     * Increments metric
     */
    increment : function (name, v) {
        // Add implementation as necessary
    },
    /**
     * Set the metric or multiple metrics at the same time.
     * */
    set : function (names, v) {
        // Add implementation as necessary
    }
};

var dgpath = '/tmp/watcher_test_dgram',
    statusPath = '/tmp/watcher_status_path_test',
    watcher_config = { max_inactive : 0.001, monitor : 0.001,  monPath: dgpath,
        timeout : 30, timeout_start : 60 };

//Instantiate watcher
var watcher_instance = new watcher.Watcher({ metric : watcher_metric, config : watcher_config });

本文地址:https://codercto.com/soft/d/3581.html

Learn Python the Hard Way

Learn Python the Hard Way

Zed Shaw / Example Product Manufacturer / 2011

This is a very beginner book for people who want to learn to code. If you can already code then the book will probably drive you insane. It's intended for people who have no coding chops to build up t......一起来看看 《Learn Python the Hard Way》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

随机密码生成器
随机密码生成器

多种字符组合密码

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具