No description
Find a file
2025-01-18 21:46:06 +00:00
archive added prism.js for syntax highlighting 2023-12-16 15:46:34 +00:00
src it wasn't fbsd after all, it was updates 2025-01-18 21:46:06 +00:00
.gitignore added build scripts 2023-12-16 16:44:06 +00:00
note.nimble some test fixes for fbsd 2025-01-18 16:08:09 +00:00
readme.md tidyup 2023-12-16 16:52:41 +00:00

note

a simple pasteBin

Heavily inspired by bin, infact, the HTML templates are effectively just copied over with some tweaks... because they're awesome :-)

note aims to be a minimalist binary, with very little that needs to be handled. Just run the binary and point your reverse proxy to the right port and away you go!

How to use

Download the latest release from the releases page and run it

./note

Or simply build the binary and run it (with the --bind-addr arg if you want)

git pull https://codeberg.org/pswilde/note
cd note
nimble build
./note --bind-addr 0.0.0.0:8820

If you want to run behind a virtual directory, i.e. so requests can be sent to a virtual dir of another webpage (via a reverse proxy) instead of the root directory, you can use the --virt-dir parameter.

./note --virt-dir /note
# Web server will only respond to requests with a path starting with "/note"

notes are stored in a table within the runtime. No persistance is currently in place, nor required as far as I'm concerned. Effectively, all notes are lost when the binary is restarted.

There's an info note at /info too

To do's

  • change some colours in the template so it's a little different to bin
  • set root folder var, so it can be hosted behind a virtual directory if required
  • check on generated id to ensure it doesn't match and current notes
  • add syntax highlighting like in bin (bit of a cheat, using prism.js )
  • curl support like in bin
  • monitor cache size, and potentially limit it if it gets too unwieldly
  • potential persistance (probably using something like redis)