Giter Site home page Giter Site logo

tiddly-wiki-server's Introduction

TiddlyWiki Server

Contributor Covenant Join the chat at https://gitter.im/tiddly-wiki-server/community

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).

Motivation

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.

Setup

To create a TiddlyWiki backed by this server:

  1. Build or install the executable on your server (e.g. by checking out this repository and running cargo install --path .).
  2. Set up the directory you want to run the server in: a. Copy the empty.html.template file into the directory. b. Create a files/ folder to hold [static files].
  3. Run tiddly-wiki-server.

Differences from TiddlyWiki

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:

  1. Download an empty TiddlyWiki from tiddlywiki.com/empty.html
  2. Add the TiddlyWeb plugin via the plugin library
  3. 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.

Contributing

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!

Code of Conduct

Contributors are expected to abide by the Contributor Covenant.

tiddly-wiki-server's People

Contributors

gitter-badger avatar nathanielknight avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tiddly-wiki-server's Issues

Explain differences from standard TiddlyWiki

The readme mentions:

It should come with a slightly altered empty TiddlyWiki that includes an extra tiddler store (for saved tiddlers)

What does this mean?. I can see the empty.html.template ... But there is no info what has been changed.

From my point of view it shouldn't be needed at all. It would be nice if the server would work with a default wiki.

Make address and port configurable

Tiddly Wiki Server currently always binds to 127.0.0.1:3032, which is perfectly fine for local development or reverse-proxying, but should be configurable.

Docker?

I'm pretty curious to try this out, but I don't know Rust at all. Any chance you could create a Dockerfile for the project?

Choose backend

To make tw data available to be used by other dapp, I want to make a tw plugin for https://github.com/CommunitySolidServer/CommunitySolidServer

It can use plugin mechanism to provide API. So I think we can use tiddly-wiki-server as API layer, and save to that server. This requires switch backend from sqlite to that server, via built-in or ipc or http.

Stream the full Wiki?

On first page load this server sends the whole TiddlyWiki bundle as well as all of the user's tiddlers. This means allocating several megabtyes of memory (which might not be relinquished to the OS). I'd be interested in the performance a solution that streams the response without loading it all into memory.

Update TiddlyWiki version

At time of submission, TWS uses TiddlyWiki 5.2.2, but the most recent release is 5.3.3, which has a bunch of bug fixes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.