lokal-js
TypeScript icon, indicating that this package has built-in type declarations

0.0.11 • Public • Published

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);

Readme

Keywords

Package Sidebar

Install

npm i lokal-js

Weekly Downloads

28

Version

0.0.11

License

MIT

Unpacked Size

20.7 kB

Total Files

8

Last publish

Collaborators

  • jihantoro