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

exposeserver

v1.1.1

Published

A tool to make a server with node.js. Uses apache2 and express.

Readme

A simple tool to create a server and expose it to the internet using nodejs.

The script will create an apache virtual host that listens on a given port and forwards traffic received at that port to some local port. The script can also create a local server that listen on the local port with some useful endpoints (see ci argument).

NOTE (for those who are confused whther they can use this tool or not):

  • The machine to use to create the server must not have a firewall blocking traffic on the port you want to expose to the internet,
  • For cloud providers you probably need to add a rule in the firewall, unless you use a port that is used by default,
  • For computers at home (behind a router), you probably can't use the tool unless you configure the router (port forwarding...).

Installation

npm install -g exposeserver

Requirements

- Apache2

Usage

You need to have super user privileges.

sudo exposeserver [-h] [-xp SERVER_PORT] [-lp PROXY_PORT] [-lh LOCAL_HOST] [-sn SITE_FILENAME] [-ar APACHE_ROOT] [-ka KILL_ALL]
           [-ci COMMAND_INTERFACE]


optional arguments:
-h, --help            show this help message and exit
-xp SERVER_PORT, --server-port SERVER_PORT
                        external port to listen to, default to 80
-lp PROXY_PORT, --proxy-port PROXY_PORT
                        local port to forward requests to, default to 8888
-lh LOCAL_HOST, --local-host LOCAL_HOST
                        local host to forward requests to, default to localhost
-sn SITE_FILENAME, --site-filename SITE_FILENAME
                        name of the site file to create (default to proxy-site-<timestamp>)
-ar APACHE_ROOT, --apache-root APACHE_ROOT
                        root of apache2 installation (default to /etc/apache2)
-ka 1, --kill-all 1
                        disable sites and remove site files (default to false), if true all other args are ignored
-ci 1, --command-interface 1
                        creates an /exec endpoint accepting a get parameter "cmd" and executing it with child_process.execSync, and
                        a /stop endpoint to stop the server

Example

npx makeserver -lp 8787

will create an apache virtual host at port 80 (default) and forward traffic from that port to local port 8787.