Integrated Static File Server

196 views
Skip to first unread message

ludwa6

unread,
Jul 4, 2020, 11:54:24 AM7/4/20
to TiddlyWiki
I would like to start Using the Integrated Static File Server, but the very brief instruction on that page doesn't explain how to turn it on in the first place.  Does this mean it should be running by default? From the given example, one would think it should be running on port 8080 at localhost (i.e. 127.0.0.1:8080), but there's nothing running there on my machine (MacOS High Sierra, v.10.13.6).  If anyone can advise how to access this feature, i'd be much obliged.

Mark S.

unread,
Jul 4, 2020, 12:50:30 PM7/4/20
to TiddlyWiki
The static server works with the node.js webserver for TiddlyWiki.

ludwa6

unread,
Jul 4, 2020, 2:49:36 PM7/4/20
to TiddlyWiki
Ah... ONLY w/ node.js?  Am not keen to make such a major change, just to enjoy this feature.  But thanks anyway, Mark, for the clarification.

Michaelsy

unread,
Jul 4, 2020, 4:47:17 PM7/4/20
to TiddlyWiki
The whole thing seems much less mysterious to me than the term "integrated static file server" seems to suggest. After all, there is always some kind of "file server", namely the software that makes it possible to make the tiddlywiki.html file available to the browser. This could be for example the web server of a provider, the web server or the file system of a local computer.

This: [ext[./files/a-big-document.pdf]] is simply the relative link to a file, relative to the address (URL) of the tiddlywiki.html file. That means, no matter where the tiddlywiki.html file is stored, create a directory named files next to it and save the a-big-document.pdf there. (Only the file permissions are still of interest. These should be identical to the tiddlywiki.html file.)

But since I'm not really sure I've overlooked anything essential, I would be happy to receive feedback.

ludwa6

unread,
Jul 5, 2020, 3:55:02 AM7/5/20
to TiddlyWiki
In fact @Michaelsy, you are perfectly right: this simple solution accomplishes what i really want, which is "inclusion" (in the non-technical sense that they are transparently accessible) of large files in my wiki, without compromising either one of (a) performance of the wiki, AND (b) portability.  This is why i don't really want to go node.js, because that's just not as portable as a single file, or directory of universally-readable files.  So thanks for pointing out the most elegant solution to this problem (hiding in plain sight, as it were :-)

TW Tones

unread,
Jul 5, 2020, 4:38:26 AM7/5/20
to TiddlyWiki
ludwa6

A bit of context in case it helps you and others that follow.

I assume you now understand single file wikis, to be accessible, they need either local file access or put it on a server you can access. You can place the file on any internet hosted folder. I use a cpanel hosting service to host single file wikis, with the tw-receiver I can also save changes to the single file. My PHP server is a static file server and external files on the same server can be accessed as external files, if you move your single file wiki you will need to move these external files with it, and if their location changes (eg folder or URL) you will have to change the links (use relative rather than absolute addresses to avoid this). You can also host wiki on tiddly-spot but not the additional files.

If using Node (install yourself) or Via TiddlyServer or Bob (including the quick install bob.exe) you can then access either single file wikis or node (folder wikis which has each tiddler as a separate file) via a url with a local or internet hosted ip address. This is great for sharing on a local LAN, or you desktop and mobile on the same network. Bob.exe handles multiple devices/tabs/people accessing the same tiddlywiki at the one time with save access. It is less common for people to have Node On the internet, if you do security demands you use a proxy server.

However with node servers, either on the LAN or the internet the Integrated Static File Server, allows you to host external files through the node server that your single file (or node/folder wiki) can access, basically it also provides the service my PHP/cpanel host was allowing you to do and put additional files separate from your wiki "online", serving files. Another feature of node hosted wikis, is every tiddler can be made available as a static html copy of the tiddler (they are just there with the correct url) so people can load and see a single tiddler, without needing to load the whole wiki.

With single file wikis, I recommend you set up a splash screen (in tiddlywiki) so people are advised the wiki is loading so they don't see a white screen for too long, they wait to see the wiki fully loaded, rather than abandon the tab. Once loaded however the performance can be great because there is nothing else to load, until you link to an external file, and it has to be loaded.

I hope this adds a little context.

Regards
Tony

ludwa6

unread,
Jul 5, 2020, 11:05:01 AM7/5/20
to TiddlyWiki
Thanks for the context, Tony, which has led me down the rabbit-hole to an interesting discovery: turns out i've been running a node.js server without even realising it, in the form of TiddlyDesktop! (which i now see from the included docs uses node.js to work it's dual-mode magic).

As it stands, i've got two TW instances on my desktop:
  1. is a single file instance, which handles relative links to files in a subfolder of its home directory the way one would expect (as in Michaelsy's example); and
  2. is a folder (i.e. node.js) wiki, wherein one cannot add a /files subfolder to any useful effect (i.e. the wiki ignores it).
So since (2) above doesn't like me to add any subfolders, but does in fact include a node.js server, i'm now wondering: does it not also give access to that Integrated Static File Server ?

/walt
Reply all
Reply to author
Forward
0 new messages