Local Tunnel Code

This commit is contained in:
2024-09-15 02:09:37 -04:00
parent 943a007161
commit 8ad6e77d4d
5 changed files with 156 additions and 19 deletions

14
localtunnel.js Normal file
View File

@@ -0,0 +1,14 @@
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');
});
})();