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

@bytelab.studio/ksm

v1.1.0

Published

A KISS server management tool

Downloads

9

Readme

KSM

A server manager following the KISS principle. (KISS Server Manager)

What is KISS


The KISS principle stands for "Keep It Simple, Stupid", and it emphasizes simplicity in design and implementation. The idea is that systems, software, or processes should be kept as simple as possible because simplicity leads to greater reliability, easier maintenance, and better usability.

In the context of software development, KISS encourages developers to:

  • Avoid unnecessary complexity.
  • Write clear and understandable code.
  • Use straightforward and minimalistic designs.
  • Focus on solving the problem with the simplest approach that works.

The underlying philosophy is that most problems can be solved more effectively with simpler solutions, and complex solutions are more prone to errors, harder to maintain, and can lead to unnecessary complications.

- ChatGPT


Philosophy

KSM focuses on simple server management that:

  • Keeps servers running
  • Can be easily configured from the server's project
  • Aims for a plug-and-play experience
  • Works with any server, regardless of its language or runtime

Installation

npm install -g @bytelab.studio/ksm

The installation requires root privileges because cronjob and other system-wide configuration files must be created.

Commands

ksm install

Adds a server to the serverlist when a config file isn't given, the command looks in the current directory for a ksm.json file. Optional the --start flag can be set to start the server as well.

ksm uninstall

Removes a server from the serverlist when a config file isn't given, the command looks in the current directory for a ksm.json file. Also, when the server is running it will be killed by ksm

ksm list

List all added servers.

Configuration

interface ServerConfig {
    cwd: string;
    ports: {
        http: number;
        https: number;
    }
    env: Record<string, string | boolean | number>;
    command: string[];
}

Sample configuration

An example configuration for a express.js app

{
    "cwd": ".",
    "ports": {
        "http": 2000,
        "https": 2001
    },
    "env": {
        "debug": false
    },
    "command": [
        "node",
        "./app/main.js"
    ]
}

The ports will be automatically added to the env as HTTPS_PORT and HTTP_PORT. The cwd property is relative to the config file. The proxy property is for the integrated ksm-proxy. But can be disabled at any time.

Template configuration

{
    "cwd": ".",
    "ports": {
        "http": 0,
        "https": 0
    },
    "env": {},
    "command": []
}

Base configuration

KSM comes with base configuration located at /etc/ksm/config.json

{
    "env": {
        "KSM_CONFIG": "/etc/ksm/config.json",
        "KSM_SERVERLIST": "/etc/ksm/serverlist"
    }
}

Which is for configure environment variables and extensions like ksm-proxy.

Contribution

Contributions are welcome! If you'd like to help improve KSM, feel free to submit a pull request or open an issue. Whether it's bug fixes, new features, or documentation improvements, all contributions are appreciated.