KABBOUCHI / bore-node

bore in Node, spawn a tunnel to your localhost

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bore-node

Installation

npm install bore-node

pnpm add bore-node

yarn add bore-node

Usage

import { install, bin } from "bore-node";
import fs from "node:fs";
import { spawn } from "node:child_process";

if (!fs.existsSync(bin)) {
  await install(bin);
}

// check bore version
spawn(bin, ["--version"], { stdio: "inherit" });

or

import { install, bin, spawn } from "bore-node";
import fs from "node:fs";

if (!fs.existsSync(bin)) {
  await install(bin);
}

// check bore version
spawn(["--version"]);

// open tunnel
spawn(["local", "8080", "--to", "bore.pub"]);

About

bore in Node, spawn a tunnel to your localhost

License:MIT License


Languages

Language:TypeScript 100.0%