Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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
```