Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/showlotus/lansite
Forwarding pages between machines in a LAN
https://github.com/showlotus/lansite
lan nuxt puppeteer
Last synced: 25 days ago
JSON representation
Forwarding pages between machines in a LAN
- Host: GitHub
- URL: https://github.com/showlotus/lansite
- Owner: showlotus
- Created: 2024-12-15T07:30:59.000Z (25 days ago)
- Default Branch: master
- Last Pushed: 2024-12-15T07:58:44.000Z (25 days ago)
- Last Synced: 2024-12-15T08:21:56.928Z (25 days ago)
- Topics: lan, nuxt, puppeteer
- Language: TypeScript
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Lansite
This mode applies to the LAN where machine A cannot access certain pages due to firewall restrictions, but machine B can access certain pages. By enabling a local lansite service on machine B, machine A enters the page U to be accessed through this service. After loading the page on machine B with Puppeteer, lansite will render the HTML of page U on lansite. Machine A will then see page U on lansite.
## Development
Install dependencies:
```bash
# npm
npm install# pnpm
pnpm install# yarn
yarn install
```Start the development server on `http://localhost:3000`:
```bash
# npm
npm run dev# pnpm
pnpm dev# yarn
yarn dev
```## Production
Build the application for production:
```bash
# npm
npm run build# pnpm
pnpm build# yarn
yarn build
```Locally preview production build:
```bash
# npm
npm run preview# pnpm
pnpm preview# yarn
yarn preview
```## Deploy
Download the [chrome-mac.zip](https://github.com/showlotus/lansite/releases/download/0.1.0/chrome-mac.zip) or [chrome-win.zip](https://github.com/showlotus/lansite/releases/download/0.1.0/chrome-win.zip) from the [release](https://github.com/showlotus/lansite/releases). Then, unzip it into the `public` directory under `dist`.
In the `dist` directory:
```bash
node server/index.mjs
```Custom port, such as the port is `3872`:
```bash
PORT=3872 node server/index.mjs
```