Files
VTHacks-12/localtunnel.js
2024-09-15 02:09:37 -04:00

14 lines
327 B
JavaScript

import localtunnel from 'localtunnel';
(async () => {
const tunnel = await localtunnel({ port: 11424 });
// the assigned public url for your tunnel
// i.e. https://abcdefgjhij.localtunnel.me
console.log(tunnel.url);
tunnel.on('close', () => {
// tunnels are closed
console.log('Tunnel closed');
});
})();