npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@pixium-digital/child-manager

v0.0.16

Published

![npm](https://img.shields.io/npm/dm/@pixium-digital/child-manager?color=orange) ![npm](https://img.shields.io/npm/l/@pixium-digital/child-manager?color=orange) ![npm](https://img.shields.io/npm/v/@pixium-digital/child-manager)

Downloads

15

Readme

Child Manager

npm npm npm

Simple library for managing node subprocesses

This tool easily lets you handle multiple sub processes when working in node environment.

Useful for launching your react app, backend and other microservices at the same time without having to have 5 terminal tabs open.


Installation

To install run the following commands:

yarn add @pixium-digital/child-manager

You can also use NPM

npm install @pixium-digital/child-manager

Run

To leverage child manager simply add a configuration file to your project (see below for config details)

You can run thew following command:

yarn child-manager

By default the loaded config will be at the source of the project and be named childmanager.json

If you wish to load a different file just pass the config option.

yarn child-manager --config="./myconfig.json"

You can then access the manager at the following: http://localhost:7000


Configuration

Here is an example configuration

{
  "processes": [
    {
      "name": "Test Service",
      "command": {
        "executor": "node",
        "args": ["TestService.js"],
        "path": "./src/service",
        "isWindows": false
      },
      "maxLogs": 200
    },
    {
      "name": "Service 2",
      "command": {
        "executor": "yarn",
        "args": ["start"],
        "path": "./other-project/service",
        "isWindows": false
      },
      "maxLogs": 200
    }
  ],
  "captureExit": true,
  "longLive": false,
  "debug": false
}

Generic configurations:

  • debug: This will show more logs in the terminal in case something is not working
  • longLive: This is to force process to stay alive. Use carefully.
  • captureExit: This binds the exit of child manager so that it will kill all childs

Process configurations:

  • name: The name of your service

  • maxLogs: The max number of logs to keep in memory (recommended 200)

  • command: This houses the command line that will be launched

    • executor: The command executor (yarn, npm, node)
    • args: Array or extra arguments that should be passed
    • path: Where the command should be executed
    • isWindows: Is this running on windows system? if yes paths and executors will be automatically changed to be compatible

Development

Local run

You can use the following command for devlopment:

ts-node src/Cli.ts

Hierarchy

  • dashboard: The source for the react dashboard
  • lib: The compiled files for publishing on npm (automated)
  • src: The source code of the project
    • __tests__: Testing folder used to verify code
    • dashboard: The built react dashboard (automated)
    • service: Test service for tests
    • utils: Utility code for the project
    • ChildManager: The manager for all the processes
    • ChildProcess: A process instance
    • Cli: The command line interface

Contributions

PRs are welcome to contribute to the project

Please follow the following standard for commits:

:emoji: action(namespace): Details

Examples:

🚀 deploy(package): Updating package.json configuration for deployment
🐛 fix(child-manager): Fix buffer overflow issue

More info for gitmoji here https://gitmoji.dev/

Bugs & Issues

Please follow the creating an issue template for any bugs or problems


Author

Burlet Mederic [email protected]

https://pixiumdigital.com

https://github.com/pixiumdigital