Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngrok

Package Overview
Dependencies
Maintainers
2
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngrok

node wrapper for ngrok

  • 5.0.0-beta.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
139K
decreased by-12.29%
Maintainers
2
Weekly downloads
 
Created

What is ngrok?

The ngrok npm package allows you to expose a local server to the internet securely. It is commonly used for testing webhooks, developing APIs, and sharing local websites. Ngrok provides a public URL that tunnels traffic to your local server, making it accessible from anywhere.

What are ngrok's main functionalities?

Expose Local Server

This feature allows you to expose a local server running on port 3000 to the internet. The ngrok.connect method creates a tunnel and returns a public URL.

const ngrok = require('ngrok');
(async function() {
  const url = await ngrok.connect(3000);
  console.log(`Server is publicly accessible at ${url}`);
})();

Custom Subdomains

This feature allows you to specify a custom subdomain for your public URL. This is useful for branding or easier access.

const ngrok = require('ngrok');
(async function() {
  const url = await ngrok.connect({ addr: 3000, subdomain: 'mycustomsubdomain' });
  console.log(`Server is publicly accessible at ${url}`);
})();

Secure Tunnels

This feature allows you to create secure HTTPS tunnels to your local server, ensuring that the data transmitted is encrypted.

const ngrok = require('ngrok');
(async function() {
  const url = await ngrok.connect({ addr: 3000, proto: 'https' });
  console.log(`Server is securely accessible at ${url}`);
})();

Inspect Traffic

Ngrok provides a web interface to inspect the traffic going through your tunnels. This is useful for debugging and monitoring.

const ngrok = require('ngrok');
(async function() {
  const url = await ngrok.connect(3000);
  console.log(`Server is publicly accessible at ${url}`);
  console.log(`Inspect traffic at http://127.0.0.1:4040`);
})();

Other packages similar to ngrok

Keywords

FAQs

Package last updated on 07 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc