Skip to content

Instantly share code, notes, and snippets.

@DestyNova
DestyNova / tw5-server.rb
Last active March 22, 2022 23:32 — forked from jimfoltz/tw5-server.rb
A local server for TiddlyWiki5 that allows saving wiki.
require 'webrick'
require 'fileutils'
if ARGV.length != 0
root = ARGV.first.gsub('\\', '/')
else
root = '.'
end
BACKUP_DIR = 'bak'
BACKUP_VERSIONS = 3