https://github.com/benpate/sseplaceholder
https://github.com/benpate/sseplaceholder
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/benpate/sseplaceholder
- Owner: benpate
- Created: 2020-08-17T00:26:27.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-09-11T12:18:44.000Z (almost 2 years ago)
- Last Synced: 2025-02-08T22:45:13.493Z (5 months ago)
- Language: HTML
- Size: 283 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SSE Placeholder
[](https://pkg.go.dev/github.com/benpate/sseplaceholder)
[](https://goreportcard.com/report/github.com/benpate/sseplaceholder)
[](https://travis-ci.com/benpate/sseplaceholder)SSE Placeholder is a simple service that generates Server Sent Events for your test pages to read. It streams fake data from [jsonplaceholder](https://jsonplaceholder.typicode.com) to your website on a semi-regular schedule.
## JSON Event Streams
Streams random JSON records every second (or so) to your client.
* `/posts.json`
* `/comments.json`
* `/albums.json`
* `/photos.json`
* `/todos.json`
* `/users.json`## HTML Event Streams
Streams random HTML fragments every second (or so) to your client.
* `/posts.html`
* `/comments.html`
* `/albums.html`
* `/photos.html`
* `/todos.html`
* `/users.html`## HTMX Demos
Includes several other demo pages that use [HTMX](https://htmx.org) to load remote data.
---
It is inspired by [jsonplaceholder](https://jsonplaceholder.typicode.com) -- *"a free online REST API that you can use whenever you need some fake data."*
Also, thanks to [HTMX](https://htmx.org) working and testing this code was the original reason for putting this code together.