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

share-web-cli

v1.0.0

Published

Easy CLI tool to share local web services using ngrok without DNS/firewall configuration

Readme

Share Web CLI

A simple and powerful CLI tool to easily share your local web services to the internet using ngrok without complex DNS and firewall configuration.

Features

  • 🚀 Easy Tunneling: Start sharing web services with a single command
  • 🔧 Multiple Protocols: Support for HTTP, HTTPS, and TCP tunnels
  • 📊 Status Monitoring: Check tunnel status and get access URLs
  • ⚙️ Configuration Management: Easy ngrok configuration editing
  • 🎯 Developer Friendly: Common development ports predefined
  • 🛡️ No DNS Required: Perfect for development and testing

Installation

Via npm (Recommended)

npm install -g share-web-cli

From Source

  1. Clone this repository
  2. Install dependencies:
npm install

Usage

Basic Usage

# Share a service running on port 3000
share-web start 3000

# Share a service on port 8080
share-web start 8080

# Check current tunnel status
share-web status

# Stop all tunnels
share-web stop

Advanced Usage

# Share with specific protocol
share-web start 3000 --protocol https

# Share TCP service (e.g., database)
share-web start 5432 --protocol tcp

# List common development ports
share-web list

# Show current configuration
share-web config show

# Edit configuration
share-web config edit

Commands

start [PORT]

Start ngrok tunnel for specified port (default: 3000)

Options:

  • --protocol: Protocol to use (http, https, tcp)
  • Default protocol: http

Examples:

share-web start 8080
share-web start 3000 --protocol https
share-web start 22 --protocol tcp

stop

Stop all active ngrok tunnels

Example:

share-web stop

status

Show current tunnel status and access URLs

Example:

share-web status

list

List common development ports and their typical uses

Example:

share-web list

config

Manage ngrok configuration

Subcommands:

  • show: Display current configuration
  • edit: Open configuration file in your default editor

Examples:

share-web config show
share-web config edit

Common Development Ports

| Port | Typical Use | |------|-------------| | 3000 | Next.js, React development server | | 8080 | Generic web application | | 5000 | Flask, Django development | | 3001 | Alternative React port | | 8000 | FastAPI, Pyramid development | | 4200 | Angular development server | | 5432 | PostgreSQL database | | 6379 | Redis cache | | 27017 | MongoDB database |

How It Works

Share Web CLI uses ngrok to create secure tunnels to your local development servers. When you start a tunnel:

  1. ngrok creates a secure connection to the ngrok cloud
  2. Your local port is exposed through a public URL
  3. You receive a public URL that can be shared with others
  4. All traffic is routed through the encrypted tunnel

Requirements

  • Python 3.6 or higher
  • ngrok binary (automatically downloaded)
  • npm (for installation)

Troubleshooting

Port Already in Use

If you get a "port already in use" error:

# Check what's using the port
lsof -i :3000

# Kill the process if needed
kill -9 <PID>

ngrok Not Found

If you get an ngrok error, make sure ngrok is properly installed:

# Download ngrok manually
wget https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.tgz
tar -xzf ngrok-v3-stable-linux-amd64.tgz
chmod +x ngrok

Authentication Issues

For persistent ngrok tunnels, you may need to:

  1. Sign up for a free ngrok account
  2. Get your auth token from https://dashboard.ngrok.com/
  3. Configure it in the ngrok configuration file

Examples

Development Workflow

  1. Start your development server:
# React app
npm start

# Next.js app
npm run dev

# Flask app
python app.py
  1. In another terminal, start the tunnel:
share-web start 3000
  1. Share the generated public URL with collaborators or for testing webhooks

Testing Webhooks

# Start your webhook receiver
python webhook_server.py  # running on port 5000

# Create tunnel for webhook testing
share-web start 5000

# Use the public URL in your webhook provider settings

Database Access

# Start PostgreSQL locally (usually port 5432)
pg_ctl start

# Share database access
share-web start 5432 --protocol tcp

# Others can connect using the provided TCP URL

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the ISC License - see the LICENSE file for details.

Acknowledgments

  • ngrok for providing the tunneling service
  • The open-source community for inspiration and feedback

Support

If you encounter any issues or have questions:

  1. Check the troubleshooting section
  2. Search existing issues
  3. Create a new issue with detailed information about your problem

Made with ❤️ by MiniMax Agent