https://github.com/maxihafer/gosynchro
Slim alternative to browser-sync, utilizing Server-Sent-Events.
https://github.com/maxihafer/gosynchro
browser-sync go live-reload
Last synced: 3 months ago
JSON representation
Slim alternative to browser-sync, utilizing Server-Sent-Events.
- Host: GitHub
- URL: https://github.com/maxihafer/gosynchro
- Owner: maxihafer
- Created: 2024-02-02T16:27:50.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-04T20:19:25.000Z (over 1 year ago)
- Last Synced: 2025-01-02T11:12:01.912Z (5 months ago)
- Topics: browser-sync, go, live-reload
- Language: Go
- Homepage:
- Size: 55.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gosynchro
gosynchro is a slim alternative to browser-sync, designed to synchronize browser windows for development. It utilizes server sent events for real-time communication between the server and the client.
## Installation
To install `gosynchro`, you can use the `go install` command.
```bash
go install github.com/maxihafer/gosynchro@latest
```## Usage
`gosynchro` is a command-line tool with several commands and options. Here's a brief overview:### Commands
- `proxy`: Starts a proxy server listening on `PORT`. It proxies all requests to the remote set using the `--remote` flag (default: `http://localhost:8080`).
- `reload`: Reloads the client listening on `PORT`.
- `help, h`: Shows a list of commands or help for one command.### Global Options
- `--port value, -p value`: Specifies the port for the server to listen on. The default value is 3000.
- `--verbose, -v`: Enables verbose logging. This is disabled by default.
- `--json`: Outputs logs in JSON format. This is disabled by default.
- `--help, -h`: Shows help information.Here's an example of how to use `gosynchro`:
```bash
# Start a proxy server on port 3000 proxying all requests to `http://localhost:8080`.
gosynchro proxy# Reload the client listening on the default port (3000)
gosynchro reload