Skip to content

RubricLab/bunl

 
 

Repository files navigation

bunl

A Bun WebSocket re-write of LocalTunnel

Usage

To try it:

bun x bunl -p 3000 -d dev.rubric.me -s my-name

Development

To install dependencies:

bun i

To run the server:

bun dev:server

(Optional) to run a dummy process on localhost:3000:

bun demo

To run the client:

bun client -p 3000

With full args:

bun client --port 3000 --domain example.so --subdomain my-subdomain --open

Or in shortform:

bun client -p 3000 -d example.so -s my-subdomain -o

The options:

  • port / p the localhost port to expose eg. 3000
  • domain / d the hostname of the server Bunl is running on eg. example.so
  • subdomain / s the public URL to request eg. my-subdomain.example.so
  • open / o to auto-open your public URL in the browser

[WIP] Deployment

To build the client code:

bun run build

To deploy the server, for example on Fly:

fly launch && fly deploy

Making sure to set DOMAIN to your domain:

fly secrets set DOMAIN=example.so

Open to PRs!

Packages

No packages published

Languages

  • JavaScript 67.4%
  • TypeScript 31.7%
  • Dockerfile 0.9%