Skip to content

JavaScript and TypeScript library for interacting with Lokal Client REST API

Notifications You must be signed in to change notification settings

lokal-so/lokal-js

Repository files navigation

Lokal JS

Library for interacting with Lokal Client REST API

npm i lokal-js
import { Lokal } from 'lokal-js';

async function main() {
	const lokal = new Lokal();

	const tunnel = await lokal
		.newTunnel()
		.setLocalAddress('localhost:3000')
		.setTunnelType('HTTP')
		// .setPublicAddress('myapp.k.lokal-so.site')
		.setLANAddress('my-app.local')
		.showStartupBanner()
		.ignoreDuplicate()
		.create();

	const lanAddress = await tunnel.getLANAddress();
	console.log('LAN Address:', lanAddress);
}

main().catch(console.error);

About

JavaScript and TypeScript library for interacting with Lokal Client REST API

Resources

Stars

Watchers

Forks

Packages

No packages published