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

https://github.com/zze0s/vnstat-sse

Expose vnstat over HTTP using SSE (server-sent-events) to send updates. Basic bundled HTMX webpage to view it.
https://github.com/zze0s/vnstat-sse

go golang htmx sse vnstat

Last synced: 5 months ago
JSON representation

Expose vnstat over HTTP using SSE (server-sent-events) to send updates. Basic bundled HTMX webpage to view it.

Awesome Lists containing this project

README

          

# go-vnstat

Expose vnstat live data over a SSE api.

## Setup

Requires Go 1.22.

Download dependencies

```bash
go mod download
```

Build binary. This outputs a binary to `dist/go-vnstat`. Make it executable `chmod +x` then you can run it with `./dist/go-vnstat`.

```bash
make build
```

## Usage

Setup a client that points to `http://ip:8200/events?stream=live-data` for json feed. `/events?stream=messages` contains html useful for HTMX SSE.