node package manager
Love JavaScript? Your insights can make it even better. Take the 2017 JavaScript Ecosystem Survey »


Start Engine

Horrible name, I know.


Just a way to run multiple processes and have line titles. Uses forever.start to spawn processes, and there's a made up wrapper (MyProcess) whose first two arguments are the same to forever.start. The third argument is for unique options, of which there's only color.


var path = require('path');
var chalk = require('chalk');
var startEngine = require('start-engine');
var appengine = startEngine.MyProcess([
        'bash', '-c', 
        ' appengine'
        uid: "appengine",
        max: 1,
        watch: false,
        killSignal: 'SIGTERM'
        filter(line, index, isLast) {
            if (line.match(/extraneous nonsense/)) {
                return false; // to totally ignore the line
            if (line.match(/modifying file/) && !this.modifiying) {
                this.modifying = true;
                this.modifiedCount = 0;
            if (this.modifying && (!line.match(/modifiying file/) || isLast)) {
                this.modifying = false;
                line = 'Modified ' + this.modifiedCount;
            } else if (this.modifiying) {
                if (this.modifiying) {
                    return false;
            return line;
var media = startEngine.MyProcess(
        args: ["appengine/media"],
        uid: "media",
        max: 1,
        watch: false
        color: chalk.yellow
    });[appengine, media]);


No matter what, silent: true gets passed to the forever process options, because I want to pre-process the output.