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

@adityapurwa/ngrose

v1.0.1

Published

CLI tool to serve a directory with HTTP and expose it via ngrok

Downloads

12

Readme

@adityapurwa/ngrose

A simple CLI tool to serve a directory with HTTP and expose it via ngrok.

Description

ngrose (Ngrok + Expose) is a command-line tool that:

  • Serves the current directory (or a specified directory) using Fastify's static file server
  • Automatically creates an ngrok tunnel to expose your local server to the internet
  • Provides a public URL that can be accessed from anywhere

This is perfect for:

  • Quickly sharing files with others
  • Testing webhooks without deploying
  • Demonstrating local web applications
  • Temporary file sharing

Installation

You can use npx to run it without installation:

npx @adityapurwa/ngrose

Or install it globally:

npm install -g @adityapurwa/ngrose

Usage

Serve the current directory

npx @adityapurwa/ngrose

Serve a specific directory

npx @adityapurwa/ngrose /path/to/directory

Serve with a specific port

PORT=8080 npx @adityapurwa/ngrose

Enable directory listing (disabled by default for security)

npx @adityapurwa/ngrose --list
# or
npx @adityapurwa/ngrose -l

Bind to all network interfaces (binds only to localhost by default for security)

npx @adityapurwa/ngrose --public
# or
npx @adityapurwa/ngrose -p

Show help information

npx @adityapurwa/ngrose --help
# or
npx @adityapurwa/ngrose -h

Combine options

npx @adityapurwa/ngrose /path/to/directory --list --public

Features

  • 🚀 Quick and easy setup
  • 🔒 Security-focused by default
  • 🛡️ Protection with security headers (Content Security Policy, XSS Protection, etc.)
  • 🚧 Rate limiting to prevent abuse
  • 📂 Optional directory listing (disabled by default)
  • 🌐 Automatic ngrok tunnel creation
  • 🔌 Works on any platform that supports Node.js

Security Features

  • ✅ Binds only to localhost by default (use --public to bind to all interfaces)
  • ✅ Directory listing disabled by default (use --list to enable)
  • ✅ Input validation for directory paths
  • ✅ Security headers with Helmet (Content Security Policy, XSS Protection, etc.)
  • ✅ CORS disabled by default
  • ✅ Rate limiting (100 requests per minute)
  • ✅ Proper error handling

Security Considerations

  • Public Access: When using the --public flag, your server will be accessible to anyone on your network. Use with caution.
  • Directory Listing: Enabling directory listing with --list can expose file names that might be sensitive. Use only when necessary.
  • Sensitive Directories: Avoid serving directories containing sensitive information.
  • HTTP vs HTTPS: The tool uses HTTP, not HTTPS. The ngrok tunnel provides HTTPS, but the local connection is still HTTP.
  • Rate Limiting: The default rate limit is 100 requests per minute. This may need adjustment based on your use case.

Dependencies

License

ISC

Author

Aditya Purwa