Skip to content

localtunnel plugin for svrx to expose your local server to public domain

Notifications You must be signed in to change notification settings

svrxjs/svrx-plugin-localtunnel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

localtunnel plugin for svrx to expose your local server to public domain

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published