Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ivangabriele/publichost
Make your localhost apps public by tunneling subdomains to them.
https://github.com/ivangabriele/publichost
cli local local-dev localhost localtunnel ngrok sdk server tunnel tunnel-client tunnel-server
Last synced: 17 days ago
JSON representation
Make your localhost apps public by tunneling subdomains to them.
- Host: GitHub
- URL: https://github.com/ivangabriele/publichost
- Owner: ivangabriele
- License: agpl-3.0
- Created: 2024-08-14T22:13:59.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-09-30T22:08:42.000Z (about 1 month ago)
- Last Synced: 2024-10-12T19:27:46.845Z (about 1 month ago)
- Topics: cli, local, local-dev, localhost, localtunnel, ngrok, sdk, server, tunnel, tunnel-client, tunnel-server
- Language: TypeScript
- Homepage:
- Size: 3.53 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
PublicHost
Tunneling subdomains to your localhost applications.
---
- [Why PublicHost?](#why-publichost)
- [Features](#features)
- [How it works](#how-it-works)
- [Installation](#installation)
- [CLI](#cli)
- [Usage](#usage)
- [Node.js SDK](#nodejs-sdk)
- [Koa Example](#koa-example)
- [Express Example](#express-example)---
## Why PublicHost?
Because [ngrok](https://ngrok.com) but open-source and free.
## Features
- [x] PublicHost Server
- [x] Basic API Key Authentication
- [x] PublicHost Client
- [x] CLI commands
- [x] Node.js SDK## How it works
**To be updated.**
## Installation
### CLI
```sh
npm install -g publichost
```### Usage
```sh
ph --help
```### Node.js SDK
```sh
npm install -E publichost
```#### Koa Example
```ts
import Koa from 'koa'const { PORT, PUBLICHOST_API_KEY, PUBLICHOST_HOST, PUBLICHOST_SUBDOMAIN } = process.env
const app = new Koa()
app.listen(PORT, () => {
console.info('[My Amazing Localhost App]', `Server listening on port ${PORT}.`)startPublicHost(PUBLICHOST_HOST, PUBLICHOST_SUBDOMAIN, PUBLICHOST_API_KEY, {
localhostAppPort: PORT,
})
})
```### Express Example
```ts
import express from 'express'const { PORT, PUBLICHOST_API_KEY, PUBLICHOST_HOST, PUBLICHOST_SUBDOMAIN } = process.env
const app = express()
app.listen(PORT, () => {
console.info('[My Amazing Localhost App]', `Server listening on port ${PORT}.`)startPublicHost(PUBLICHOST_HOST, PUBLICHOST_SUBDOMAIN, PUBLICHOST_API_KEY, {
localhostAppPort: PORT,
})
})
```