New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

serverless-ngrok-tunnel

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-ngrok-tunnel

Serverless plugin that creates ngrok public tunnel on localhost.

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
244
increased by23.23%
Maintainers
1
Weekly downloads
 
Created
Source

serverless-ngrok-tunnel

serverless npm PRs Welcome

Serverless plugin that creates ngrok public tunnel on localhost. Optionally, writes tunnels url to .env file and deletes them after session is over. Useful for when you want to expose url for other applications to use (for example mobile application).

Installation

Add serverless-ngrok-tunnel to your project: npm install --save-dev serverless-ngrok-tunnel

Then inside your serverless.yml file add following entry to the plugins section:

plugins:
  - serverless-ngrok-tunnel

Usage

First you will need to configure tunnels. In your serverless.yml file add:

custom:
  ngrokTunnel:
    envPath: '../.env' # optional. Path to your .env file, relative to serverless.yml file
    tunnels: # required

      # if you are using `serverless-offline` plugin, expose api gateway
      - port: 8000 # required
        envProp: 'API_GATEWAY' # optional. property in .env file to assign url value to

      # or if you are using `serverless-iot-offline` plugin, expose IoT endpoint
      - port: 1884
        envProp: 'IOT_ENDPOINT'
        ws: true # expose web-socket url
        path: '/mqqt' # additional path to url

      - port: 9000
        ngrokOptions: # optional. custom ngrok options
          authtoken: '12345'
          region: 'us'
          subdomain: 'my-subdomain'

For a list of available ngrok options checkout ngrok documentation.

To start tunnel/s run sls tunnel. If you are using serverless-offline plugin

  • v2: start offline with option flag: sls offline start --tunnel=true.
  • v3: start offline with option flag: sls offline start --param="tunnel=true".

Contributing

Yes, please. Checkout contributing guidelines.

Licence

MIT

Keywords

FAQs

Package last updated on 28 Sep 2022

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