Making a read only copy using node.js

37 views
Skip to first unread message

Rob Short

unread,
May 5, 2017, 11:00:09 AM5/5/17
to TiddlyWikiDev
I'm running TW5 in Node.js on a centralized server.

My goal was to find a way to have a read only version and a editable version. I must have searched for days trying to figure this out...

In the end I created two tiddlywiki core folders with the difference being the read only one has a sync filter of -[is[tiddler]]

I can then start one version on one port from one folder and another on a different port, different password from the other folder, but both of them link to the same wiki.

So example (and I'm using windows...):

Folder one is c:\users\<username>\appdata\roaming\npm\node-modules\tiddlywiki and there I run:
node tiddlywiki "<path to wiki>" --server 8081 $:/core/save all text/plain text/html <user> <password> <listening IP>

Folder two (with the change to core\wiki\config\syncfilter.tid) is C:\Users\<username>\AppData\Roaming\npm\node_modules\tiddlywikiRO and to run:

node tiddlywiki "<path to wiki>" --server 8080 $:/core/save all text/plain text/html "" "" <listening IP>

Works great! just don't override the syncfilter in your wiki.





Reply all
Reply to author
Forward
0 new messages