Skip to content

Instantly share code, notes, and snippets.

@Lomanic
Last active April 28, 2023 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Lomanic/bcd81fc1f516e75c9bf5a4dd312172ca to your computer and use it in GitHub Desktop.
Save Lomanic/bcd81fc1f516e75c9bf5a4dd312172ca to your computer and use it in GitHub Desktop.
redbean.dev + tiddlywiki

This is an adptation of this article describing a redbean-based tiddlywiki server (with persistence) shared on lobste.rs and hacker news. Unfortunately, the code provided in the article doesn't work out-of-the-box, so here it is for an easy copy-paste.

if [ ! -f redbean.com ]; then
    curl https://redbean.dev/redbean-latest.com -o redbean.com
    chmod +x redbean.com
fi
cp -a redbean.com wiki.com

if [ ! -f wiki.html ]; then
    curl https://tiddlywiki.com/empty.html -o wiki.html
fi

zip wiki.com wiki.html index.lua
./wiki.com -M 5000000 -\*

To run the tiddlywiki server (as the previous build script will erase everything stored in the wiki.com binary), use ./wiki.com -M 5000000 -\*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment