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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@plinthjs/octane

v0.1.0

Published

Mason persistent high-throughput app server (the Laravel Octane equivalent).

Readme

@plinthjs/octane

A persistent, high-throughput application server for Mason, the Laravel Octane equivalent. A conventional runtime boots the framework on every request; Octane boots the Application once and reuses the warm instance across many requests. After every request (success or failure) the worker flushes scoped container instances, so per-request state never leaks into the next request.

Built only on Node built-ins (node:http, node:cluster) plus @plinthjs/core and @plinthjs/http.

Install

npm install @plinthjs/octane

Usage

import { Application } from '@plinthjs/core'
import { HttpKernel, Response, Router } from '@plinthjs/http'
import { OctaneServer, OctaneWorker } from '@plinthjs/octane'

const app = new Application({ runningInConsole: false })
const router = new Router()
router.get('/ping', () => Response.json({ pong: true }))
const kernel = new HttpKernel(router, { container: app })

const worker = new OctaneWorker({ app, kernel })
const server = new OctaneServer(worker)

await server.start({ port: 8000, host: '0.0.0.0' })

// Later, on shutdown: closes the HTTP server, stops ticks, terminates the app.
await server.stop()

The worker

OctaneWorker is the testable core. Give it a ready { app, kernel } context, or a factory that is invoked once on first boot:

const worker = new OctaneWorker({ factory: async () => buildContext() })

await worker.boot() // idempotent; also boots the Application
const response = await worker.handle(request) // runs through the warm HttpKernel
worker.requestsHandled() // 1
worker.isBooted() // true

Lifecycle hooks

Every hook registrar returns the worker, so they chain:

worker
  .onBoot((app) => warmCaches(app)) // once, after the first boot
  .onRequest((request) => metrics.start(request))
  .onRequestHandled((request, response) => metrics.finish(request, response))
  .onTick(() => flushBuffers(), 5_000) // every 5 seconds while serving
  .onTerminate((app) => closeConnections(app))

Tick timers are started by server.start() (or worker.startTicking()), are unref'd so they never hold the process open, and swallow errors so a failing task cannot crash the worker. Call worker.tick() to run every tick hook once, which is handy in tests.

Clustering

await server.start({ port: 8000, workers: 4 })

With workers > 1 the primary process forks that many workers via node:cluster (re-forking any that exit) and resolves undefined; each worker serves its own warm instance. Under a test runner the server always runs single-process. Use server.build() to get an unbound node:http server for a booted worker, and getServer() / getWorker() to inspect the running instance.

Concurrent tasks

import { concurrently } from '@plinthjs/octane'

const [users, orders] = await concurrently([() => loadUsers(), () => loadOrders()])