A personal microblog that allows you to share a 'stream of snippets'—fragments of Markdown that you can append from the command line.
This is a lightweight, static SolidJS app that tails an xs
event stream. It publishes frames with the topic 'snippet' and displays them as Markdown fragments.
$ git clone https://github.com/cablehead/stream-of-snippets.git
$ cd stream-of-snippets
# run the event stream in one window
$ xs serve ./store —expose :3021
# run vite in another window
$ deno task dev
# append a snippet in a 3rd window
$ echo "my first post" | xs append ./store snippet
vite.config.ts is configured to proxy /api/*
to localhost:3021, to expose the event stream
http://your-stream-of-snippets... ┌───────────────────────────────────────────────────┐ │ # proxy /api to xs │ │ # /api/* ◀─────────────────────────────────────┼────────┐ │ │ │ │ # otherwise serve the static SolidJS built dist │ │ │ # /* -> ./dist/* │ │ └───────────────────────────────────────────────────┘ │ ┌─────────────────────────────┴─────┐ │ `xs serve ./store --expose :3021` │ └────────────────────────────▲──────┘ to publish: │ $ bp | xs append ./store snippet ]───────────────────┘