Skip to content

Latest commit

 

History

History
53 lines (36 loc) · 2.71 KB

README.md

File metadata and controls

53 lines (36 loc) · 2.71 KB

A personal microblog that allows you to share a 'stream of snippets'—fragments of Markdown that you can append from the command line.

a stream of snippets

a women projecting a 'stream of snippets', notes she's curated, kung fu cartoon styled, seemingly to save the world

overview

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.

dev

$ 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

image

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  ]───────────────────┘

screencasts and screenshots

cast.mp4
image