This is a web server for TiddlyWiki. It uses TiddlyWiki's web server API to save tiddlers in a [SQLite database]. It should come with a slightly altered empty TiddlyWiki that includes an extra tiddler store (for saved tiddlers) and the TiddlyWeb plugin (which is necessary to make use of the web server API).
TiddlyWiki 5 has a NodeJS based web server that re-uses much of the front-end JavaScript for maximum compatibility. However, this server needs about 70 MB of memory to start, and can easily consume 100 MB or more. This is fine for running on a workstation, but a cheap VPS quickly gets crowded running services of this size.
In rudimentary benchmarks it looks like tiddly-wiki-server
uses about 10 MB of
memory (with no optimizations), which I find much more manageable.
To create a TiddlyWiki backed by this server:
- Build or install the executable on your server (e.g. by checking out this
repository and running
cargo install --path .
). - Set up the directory you want to run the server in: a. Copy the
empty.html.template
file into the directory. b. Create afiles/
folder to hold [static files]. - Run
tiddly-wiki-server
.
The initial page that this project serves has a few changes compared to the empty wiki you can download from tiddlywiki.com/empty.html. It has:
- the TiddlyWeb plugin to let TiddlyWiki save data to the server, and
- any data that you entered or imported.
- no
noscript
section for browsers that disable JavaScript (this is considered a bug)
It was created by following this procedure:
- Download an empty TiddlyWiki from tiddlywiki.com/empty.html
- Add the TiddlyWeb plugin via the plugin library
- Add a
script
element to the very end of the HTML document with
class="tiddlywiki-tiddler-store"
type="application/json
- The contents
@@TIDDLY-WIKI-SERVER-EXTRA-TIDDLERS-@@N41yzvgnloEcoiY0so8e2dlri4cbYopzw7D5K4XRO9I@@
The server replaces the contents of the script
tag with the saved tiddlers.
Since tiddlers can contain escaped (sometimes twice-escaped) code in various
programming and/or markup languages, creating a separate tiddler store is much
easier than dynamically modifying the core TiddlyWiki tiddlers.
The most valuable way to contribute to this project is currently testing: try to setup a TiddlyWiki with it and see if it behaves the way you'd expect. The server aims to have feature parity with the first-party NodeJS server; any discrepancy is a potential bug, which I'd be very grateful to have reported!
Contributors are expected to abide by the Contributor Covenant.