Announcing TiddlyServer... a NW.JS desktop application that manages multiple WikiFolders.

337 views
Skip to first unread message

Matthew Lauber

unread,
May 16, 2016, 4:57:39 PM5/16/16
to TiddlyWikiDev
All,
   I am pleased to announce the initial public offering of software I've taken to calling TiddlyServer.  TiddlyServer is a NW.js desktop application that can be used to setup a local server serving  multiple Wikifolders.

To start off with, here's a quick look at the current UI.  


The top Row is how you add additional wiki folders.  Using the "Choose File" button you can select the root folder of your WikiFolder instance.
The text box is the prefix you want the site to be available at.  
The Add button has a click event that adds the path and prefix to the config, starts the server, and then refreshes the UI.

Below that are multiple rows of Individual wikis.  Right now they're very sparse, grabbing just the title from the wiki itself, then listing the prefix for that wiki.  Clicking anywhere on the row for a wiki opens it in your default browser.
The Delete word is a button that stops the server and removes the wiki from the config file, then updates the UI.

Now a quick look at how this is designed.

This application is basically a big wrapper around being able to start multiple instances of TW5.  the code here contains most of the logic.  
                  1. Upon starting up, it loads a config file if it exists, instantiates a TW5 instance for each wikifolder in the list.
                    1. The instance of TW5 is running a custom TW5 command "unixserver" that basically uses a unix socket file instead of a port number.
                    2. Each instance of TW5 starts listening on it's socketPath.
                  2. It also starts up a proxyServer listening on port 8080.  This proxyServer looks at the path part of the url, and uses that to proxy the request to the correct Socket.
                    1. If the wiki path does not match any prefix it'll respond saying that path doesn't match any wikis, please choose from the list below... and lists the wikis
                  3. Finally, the UI starts up.  The UI allows the end user to add or remove the wikis and prefixes available.  
A few notes at present.
  • This likely only works on Unix and OSX.  I'm currently relying on Unix Socket files to communicate between the proxy server.  AFAIK, unix socket files are not supported on Windows.  It would be possible to change this to use multiple ports.
  • This does not support WikiFiles, yet.  Only WikiFolders.
  • The UI was hacked together via React in an afternoon to demonstrate that this was feasible.  It does not provide basically any error handling.

Installing:
  1. Download the stable release of nw.js from http://nwjs.io/
  2. extract nw.js
  3. Clone the repository at https://github.com/mklauber/TiddlyServer.git
  4. cd to the `source` directory of the cloned repo
  5. run `npm install`
Running: 
  1. run `/path/to/nw.js-vx.x.x-.../nw .`

I was inspired to tackle this based on some comments Jeremy made on the direction that he'd like to take TiddlyDesktop.  Hopefully the community finds it interesting, if not yet actually useful.  I would appreciate feedback, suggestions, and especially Pull Requests.

Thanks,
Matt Lauber

Jeremy Ruston

unread,
May 17, 2016, 5:19:09 PM5/17/16
to TiddlyWikiDev
Hi Matt

Bravo! A terrific piece of work, and this is exactly the direction that I was hoping to take TiddlyDesktop. I’m on vacation at present, and will look forward to putting it through its paces when I return in 10 days or so,

Best wishes

Jeremy

--
You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikide...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/f21846e3-f3ac-4b31-86af-b6f252da61f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jonathan Doughty

unread,
Aug 28, 2016, 2:04:47 PM8/28/16
to TiddlyWikiDev

Any further thoughts on this?

I was recently motivated to begin the switch from using several single TW5 files to node-served WikiFolders of tid files via tiddlywiki --server. Now that I have started that process I am beginning to encounter the issues of running separate tiddlywiki --server instances on separate ports and the desire to share portions of my collection of tid files between those while keeping the content segregated into folders.  Using REST path prefixes and WikiFolders seems like an ideal way to accomplish that and Matt's efforts seemed to be headed in that direction. But the promising beginning does not seem to have advanced.

(FWIW, I can get TiddlyServer to present its GUI but not actually serve any WikiFolder contents.)

Matabele

unread,
Aug 29, 2016, 1:29:04 AM8/29/16
to TiddlyWikiDev
Hi Jonathan

Have you had a look at Electron? The framework looks to be more suitable than node webkit for this project.

regards

Matthew Lauber

unread,
Sep 1, 2016, 9:18:43 AM9/1/16
to TiddlyWikiDev
Jonathan,

I've not really touched this since I announced this project.  At the time, I got hung up over how to handle single file wikis, because the server command doesn't automatically handle them.  If you've converted to wiki folders already, this tool should work for you, although it won't help with sharing tiddlers between wiki folders.  If you're using mac or linux, you could look into manually creating symlinks between the wiki folders, and I believe that any change in one wiki would change the file for all of them (note however, that you may have to reload/restart the other servers in order for them to notice, I just don't know.)  Also worth looking at for you is Jeremy's TiddlyDesktop (https://github.com/Jermolene/TiddlyDesktop) he's announced that he's stopping development on it, but it's still further along than my project at this time.  I recently figured out how to convert wiki files to wiki folders programmatically and vice versa, so I've been waiting for a good moment to come back to this and get it to the point of importing and exporting both files and folders.  

Matt

Tobias Beer

unread,
Sep 2, 2016, 5:02:51 PM9/2/16
to TiddlyWikiDev
Hi Matthew,
 
If you're using mac or linux, you could look into manually creating symlinks between the wiki folders

Works like a charm on my Win 10 machine as well. Makes plugin development and publishing a bit easier, since there's only one source folder, not many. And I just symlink things where i want them included w/o having things pushed to a repo or twice on my hd.

Best wishes,

Tobias.

Danielo Rodríguez

unread,
Sep 3, 2016, 5:58:48 AM9/3/16
to TiddlyWikiDev
> Works like a charm on my Win 10 machine as well

Which tool do you use for creating symlinks on windows? It is not supported out of the box

Tobias Beer

unread,
Sep 5, 2016, 3:22:10 PM9/5/16
to TiddlyWikiDev
Hi Danielo,
 

Which tool do you use for creating symlinks on windows? 

It is not supported out of the box


It is very much supported out of the box.
It's just ...there aren't any native facilities
making it a simple, non-command-line exercise.

And so, because I'm a lazy one,
I use Link Shell Extension.

Best wishes,

Tobias. 

Matthew Lauber

unread,
Dec 2, 2016, 10:42:15 AM12/2/16
to TiddlyWikiDev
TiddlyServer 1.0.0 has been released.  See here:  https://groups.google.com/forum/#!topic/tiddlywiki/QOoceRMdABE


On Monday, May 16, 2016 at 4:57:39 PM UTC-4, Matthew Lauber wrote:
Reply all
Reply to author
Forward
0 new messages