JSPM

portmore

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q53232F
  • License ISC

A portless process wrapper that assigns and aliases free ports for local in process service orchestration.

Package Exports

  • portmore

Readme

portmore

Local multi-service helper with automatic free ports, portless aliases, and a small dashboard.

Disclaimer: Primarily coded by Codex, worktree/branch naming not supported, https not tested.

Requirements

  • Node.js 22+
  • portless installed and available in PATH

Install

npm install portmore

Quick usage

import { createServer } from "node:http";
import { portmore } from "portmore";

await portmore({
  name: "server-a",
  title: "Server A",
  metrics: async () => ({ visits: 42 }),
  start: async (port) => {
    const server = createServer((_, res) => {
      res.statusCode = 200;
      res.end("Server A\n");
    });

    return server.listen(port);
  },
  stop: async (server) => {
    await new Promise<void>((resolve, reject) => {
      server.close((err) => {
        if (err) {
          reject(err);
          return;
        }
        resolve();
      });
    });
  },
});

Dashboard

Portmore Dashboard