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

dynapm

v1.0.3

Published

DynaPM is a dynamic start-stop application management tool with serverless-like features designed for resource-constrained environments. It starts and stops programs on demand, optimizes resource usage, and is suitable for private deployments.

Readme

DynaPM

中文文档

This is a program management tool for dynamically starting and stopping programs, with some serverless-like features. The goal is to maintain a large number of low-frequency accessed programs while keeping a few high-frequency accessed programs running online, all while dealing with limited resources in a private deployment environment.

Each time a user accesses one of these programs, if the program is offline, the gateway temporarily suspends the request and immediately starts the program. Once the program starts successfully, the gateway acts as a reverse proxy.

When memory is insufficient or a program has been idle for a long time, the program is automatically shut down to free up server resources.

Starting the simplest Node.js HTTP program using pm2 takes approximately 600ms.

Starting [test]
Starting [test] took 601 ms
Stopping [test]
Starting [test]
Starting [test] took 592 ms
Stopping [test]

Introduction

I often want to write programs that run continuously, and I hope to be able to access their websites or call their APIs at any time. However, these programs are not always working, so I also hope that when they are not working, they consume almost no CPU or RAM except for disk space. Previously, I looked into serverless solutions, but they were still quite麻烦 in terms of deployment and did not fully utilize my idle servers.

Now I can use DynaPM to keep thousands of programs ready for immediate access as long as my disk space allows. Of course, the actual number of programs that can run simultaneously may be limited to dozens depending on the machine's capacity, but most of the programs I have written in the past do not have long service times, so this limitation should not be a problem.

Features

  • [x] Start programs using pm2 when a request arrives
  • [x] Shut down programs when they are idle
  • [ ] Support auto-scaling
  • [ ] Support persistent operation (only shut down programs when idle RAM is insufficient)
  • [ ] Support cron jobs
  • [ ] Support dynamically starting and stopping Docker containers
  • [ ] Support starting programs using spawn/fork

Performance

fastify + @fastify/reply-from

After a cold start, testing performance with autocannon http://127.0.0.1:83 yields an average of 3000 req/s.