Skip to content

allanhvam/portmore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors