Skip to content
localtunnel plugin for svrx to expose your local server to public domain
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
index.js
package-lock.json
package.json

README.md

svrx-plugin-localtunnel

svrx plugin for localtunnel

This plugin is used to expose your local server to localtunnel.me

Usage

please confirm you have installed svrx already

Via CLI

svrx -p "localtunnel"

Via API

const svrx = require('@svrx/svrx');

svrx({
    plugins: ['localtunnel']
}).start();

With options

svrx({
    plugins: [{
        name: 'localtunnel',
        options: {
            subdomain: 'svrx'
        }
    ]
}).start();

With events

const server = svrx({
    plugins: ['localtunnel']
});
server.on('localtunnel:ready', (tunnel) => {
    console.log(`url is available at ${tunnel.url}`)
});
server.start();

Example above will prepare https://svrx.localtunnel.me for you

Options

subdomain [String]:

A string value requesting a specific subdomain on the proxy server

Subdomain is optional, localtunnel will auto create a random domain for you.

localhost [String]:

Proxy to this hostname instead of localhost

localhost is optional

host [String]:

specify host if you want to use custom localtunnel/server , or Deploy localtunnel server with docker-compose

Deafult is https://localtunnel.me

Events

localtunnel:ready

Emitted when localtunnel is ready.

params:

tunnel [Object]: localtunnel instance, see localtunnel API

localtunnel:error

Emitted when an error occurred.

params:

message [String]: error message

You can’t perform that action at this time.