@askeladden/ngrok-dev
TypeScript icon, indicating that this package has built-in type declarations

1.4.0 • Public • Published

Ngrok dev

This package provides a simple way to expose your local development server to the internet using ngrok

Pre-requisites

Make sure you've set your ngrok authtoken if you're planning on running more than one tunnel at once. You can do this by running ngrok config add-authtoken <YOUR_AUTHTOKEN> or ngrok authtoken <YOUR_AUTHTOKEN> depending on your ngrok version. See this for more details.

Usage

ngrok-dev [<port>:<optional environment variable>]

Options
  --command <command>   The package.json command to run to start the server (default: dev:internal)
  --subdomain <subdomain>  Support for custom subdomain (default: random123)

Example package.json

{
  // ...
  "scripts": {
    "dev": "ngrok-dev 3000:NEXTJS_URL,8080 --command custom:dev",
    "custom:dev": "next dev"
  }
  // ...
}

This will expose your local development server on port 3000 and 8080 to the internet and set the environment variable NEXTJS_URL to the ngrok url and expose it to your command. The port 8080 won't get an environment variable

Readme

Keywords

none

Package Sidebar

Install

npm i @askeladden/ngrok-dev

Weekly Downloads

15

Version

1.4.0

License

none

Unpacked Size

13.9 kB

Total Files

6

Last publish

Collaborators

  • petter_askeladden