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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@nutsloop/ivy-server

v1.8.0-alpha.2

Published

Facilitating & Enhancing Network Strength.

Readme

@nutsloop/ivy-server

Facilitating & Enhancing Network Strength

Alpha Warning: This project is in early development. Expect breaking changes, bugs, and a little chaos. We document with love, but things may shift quickly.


Description

What is Ivy Server?

@nutsloop/ivy-server is a modern, powerful, TypeScript-powered command-line server. With a rust-native file watcher at its core, it enhances developer workflows with features like:

  • ⚙️ Live browser reloading on file changes (powered by Rust) for instant feedback and seamless development
  • 🛰️ Static and dynamic content serving
  • 🔁 Built-in route support
  • 🧪 Zero-config developer experience
  • 🧩 Extensive CLI customisation through flags
  • 🛠️ Experimental control room for remote management, audit via secure sockets (work in progress)
  • 🌐 Multi-domain support — Serve content across multiple domains with ease!

Common uses include:

  • ⚡️ Local development servers for fast feedback loops
  • 🌐 Lightweight APIs and microservices
  • 🧪 Experimental workflows and prototyping

Requirements

  • Supported Operating Systems:

    • Linux (tested on Fedora and Oracle Linux)
    • macOS
    • Windows is not supported
  • Software dependencies:


Quick Start

📦 Installation

Install via npm:

Important:
@nutsloop/ivy-server runs only on Unix-like systems (macOS, Linux). Windows is currently not supported.
It also requires Node.js v20 or higher.

npm install @nutsloop/ivy-server
npm pkg set type=module

Warning:
@nutsloop/ivy-server is built exclusively with ES Modules (ESM).
Your entire project — including all route handlers — must use ESM.
CommonJS (require, module.exports) is not supported and will cause runtime errors.

To ensure compatibility:

  • Set "type": "module" in your package.json.
  • Use import / export syntax only.
  • Avoid .cjs or CommonJS-style tooling.

This strict ESM-only setup guarantees cleaner semantics and future-friendly module resolution.


Create a Public Directory

Ivy serves static files from a ./public directory by default. To get started, create the folder and add a basic index.html:

mkdir ./public
echo '<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Ivy Server</title>
  </head>
  <body>
    <h1>Hello from Ivy</h1>
  </body>
</html>' > ./public/index.html

Start the server:

export PATH="$PWD/node_modules/.bin:$PATH"
ivy-server spin

CLI Commands and Flags

Ivy Server includes powerful commands and flags for customisation.

Core Commands

  • spin: Start a single server instance:

    ivy-server spin
  • cluster: Start multiple server instances using Node.js clusters:

    # this will fork for the half of the available cpus
    ivy-server cluster
  • help: View help documentation for commands/flags:

    ivy-server --help
  • version: View the current version of Ivy Server:

    ivy-server --version

🌍 Global Flags

🌍 Global Flags

| Flag | Type | Description | |-------------------------|------|---------------------------------------------------------------------------------------| | --ease, -e | void | Allows binding to ports below 1024 (note: system-level restrictions may still apply). | | --ease-cluster, -ec | void | Removes cluster CPU limits — allows forking any number of workers. |

# let’s assume the server has 8 CPUs available and system-level port restrictions have been eased.
ivy-server --ease --ease-cluster cluster --port=80 --cpus=32

🛠️ Common Flags

| Flag | Type | Description | |---------------------------------|------------|----------------------------------------------------------------------| | --address, -a | string | Address to bind the server (default: 0.0.0.0). | | --port, -p | number | Port to run the server on (default: 3001). | | --https, -S | void\KVP | Enable HTTPS. | | --log, -l | void | Enable request logging. | | --log-color, -lc | void | Colorize log output (requires --log). | | --log-persistent, -lp | void | Persist logs to file/db (requires logConfig.js). | | --log-request-headers, -lrh | void | Log request headers (requires --log). | | --acme-challenge, -ac | void | Serve ACME challenge files, skipping redirects/multidomain. | | --control-room, -cr | void | Open a socket for stats/control panel. | | --cut-user-agent, -cua | void | Hide the user-agent in logs. | | --hot-routes, -hr | void | Enable hot reloading of routes. | | --live-reload, -lr | void/KVP | Live reload server when files change. | | --multi-domain, -md | string | Load multidomain config from file. | | --mute-client-error, -mce | void | Suppress client error logs. | | --routes, -r | string | Path to custom routes file. | | --virtual-routes, -vr | string | Declare STATUS_CODE 200 for addresses (used with --to-index-html). | | --to-index-html, -tih | void | Route all requests to index.html. | | --plugins, -P | array | Load list of comma-separated plugins. | | --served-by, -sb | string | Set a custom served-by HTTP header. | | --socket, -s | void | Enable socket/tls connection (requires socketConfig.js). | | --redirect-to, -rt | string | Redirect requests to another URL (e.g., 301 redirects). | | --redirect-to-https, -rth | void | Redirect requests to HTTPS (works with --redirect-to). | | --www-root, -wr | string | Directory for static content. |

🧠 Cluster-Specific Flags

| Flag | Type | Description | |----------------|-------------|------------------------------------------------------------------------------------------| | --cpus, -c | number/void | Number of CPUs to utilize. If no value is provided, defaults to half the available CPUs. | | --exec, -e | string | Path to an entry file to execute in cluster mode. |

Example usage:

ivy-server cluster --cpus=4

Advanced Features

Multi-Domain Support

Serve multiple domains with a configuration file:

ivy-server spin --multi-domain=path/to/config.json

Plugin Support

Load plugins dynamically:

ivy-server spin --plugins=plugin1,plugin2

Live Reload

Enable reload of the browser when files change (rust powered in part):

ivy-server spin --live-reload

Development Notes

  • Ivy Server is not production-ready yet.
  • It works on Unix-like operating systems (Linux and macOS). Windows is unsupported.

Links


💚 If you love Ivy Server, it loves you twice!