svrx plugin for localtunnel
This plugin is used to expose your local server to localtunnel.me
please confirm you have installed svrx already
svrx -p "localtunnel"
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
A string value requesting a specific subdomain on the proxy server
Subdomain is optional, localtunnel will auto create a random domain for you.
Proxy to this hostname instead of localhost
localhost is optional
specify host if you want to use custom localtunnel/server , or Deploy localtunnel server with docker-compose
Deafult is https://localtunnel.me
Emitted when localtunnel is ready.
params:
tunnel [Object]
: localtunnel instance, see localtunnel API
Emitted when an error occurred.
params:
message [String]
: error message