benpate / sseplaceholder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SSE Placeholder

GoDoc Go Report Card Build Status

SSE Placeholder is a simple service that generates Server Sent Events for your test pages to read. It streams fake data from jsonplaceholder 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 to load remote data.


It is inspired by jsonplaceholder -- "a free online REST API that you can use whenever you need some fake data."

Also, thanks to HTMX working and testing this code was the original reason for putting this code together.

About


Languages

Language:HTML 55.6%Language:Go 41.7%Language:CSS 2.7%