How to use WebServer without Node.js?

81 views
Skip to first unread message

bimlas

unread,
Mar 4, 2020, 5:17:30 PM3/4/20
to TiddlyWikiDev
Dear all,

Can I run TiddlyWiki WebServer without Node.js? I need to query the individual tiddlers in HTML, but my host service does not provide Node.js. There is Python on the server, but I can't run TiddlyWeb (https://github.com/tiddlyweb/tiddlywebwiki) even on localhost: pip install throws segmentation fault on Linux. Did someone get it up and running like Node.js Tiddly? PHP and Java servers could also be considered if they can query individual tiddlers.

TonyM

unread,
Mar 4, 2020, 5:40:59 PM3/4/20
to TiddlyWikiDev
Bimlas,

Others may have an answer. 

The key method to host online for me is php and tw-receiver but for single file wikis only, this rest on top of a standard html server and there numerous ways to build or host such servers. It would be great if we had a php saver for tiddlywiki that operated like node.js ie folder based wiki.

At present only bob on node has the multi-user multi-access solution typically needed for an online server, although the method used by NoteSelf may be an alternative;
  • I think a php solution would ether need this added functionality multi-user multi-access or at a minimum the ability for a group of users with read/write access to serialy edit, ie; lock the wiki in their name.
  • I also wonder if a html put and get server and saver version could be built.
Of course sometimes you could package node inside something like a virtual machine, Docker container and serve it that way instead.

One thing you could add to this discussion is why you want individual tiddlers because there are increasingly more opportunities to meet some of the requirements that separate files satisfy but now within the wiki? Ie what is driving your desire for a alternative server platform beyond not node.

PS I have a control panel hosting environment and whilst they did not document it a technician showed me how to host a nodejs instance, I did not continue because even bob presents security risks on the internet, although Jed has implemented a secure version with other technology involved.

TonyM

unread,
Mar 4, 2020, 5:49:23 PM3/4/20
to TiddlyWikiDev
Post Post Script,

I just wanted to add there are two ways to Host or Serve a Wiki, one is the file/folder content, the other is to provide the HTML access to the server. 

What I mean is if the servers files are shared online you can have node JS run against those files. Ie you take your server with you. Of course you can run the server node session off the cloud version but only one at a time however I think (unsure) Jed was looking at the ability for multiple node servers against the one repository.

finally,
I think there may be value using a VPN to access a node hosted bob, ie keep it as a LAN based solution secured inside a VPN to make it internet accessible.

Regards
Tony

bimlas

unread,
Mar 5, 2020, 5:38:19 AM3/5/20
to TiddlyWikiDev
TonyM,

I want to get Tiddly to keep and edit notes that I can display on a web page independently of Tiddly. So Tiddly would be the "editor", but the display would be eg. In PHP. On the other hand, I also want to make the wiki completely online, so that I can access it anywhere and the changes are all in one place.

I don't like the idea of a VPN because I don't think I get it through a webhost, on the other hand, it would have to run at home on a continuously running server. If I already have a web host, I'd like to use it for this purpose.

bimlas

unread,
Mar 5, 2020, 5:55:34 AM3/5/20
to TiddlyWikiDev
I remember there was a web page that used Tiddly just like this: the look was maybe PHP and Tiddly was the database. A dark red color dominated the site. Does anyone remember which side it was?

Jed Carty

unread,
Mar 5, 2020, 7:06:29 AM3/5/20
to TiddlyWikiDev
BobEXE doesn't require node, so it may be a possibility. I think I am the only one who ever managed to run the secure server version, but if you have Apache or nginx to handle the access control that shouldn't be a problem.

Mohammad Rahmani

unread,
Mar 5, 2020, 7:19:05 AM3/5/20
to tiddly...@googlegroups.com
bimlas,
 Not sure if this Python Script can do the Job




Best wishes
Mohammad


On Thu, Mar 5, 2020 at 1:47 AM bimlas <bimba....@gmail.com> wrote:
Dear all,

Can I run TiddlyWiki WebServer without Node.js? I need to query the individual tiddlers in HTML, but my host service does not provide Node.js. There is Python on the server, but I can't run TiddlyWeb (https://github.com/tiddlyweb/tiddlywebwiki) even on localhost: pip install throws segmentation fault on Linux. Did someone get it up and running like Node.js Tiddly? PHP and Java servers could also be considered if they can query individual tiddlers.

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/57474859-b200-4bb7-be82-5ad5fb7925bd%40googlegroups.com.

bimlas

unread,
Mar 5, 2020, 7:58:36 AM3/5/20
to TiddlyWikiDev
Mohammad,
 Unfortunately this only works with the single HTML wiki, so I can't query individual tiddlers. Nonetheless, it may be helpful, thank you for the tip.

bimlas

unread,
Mar 5, 2020, 8:01:10 AM3/5/20
to TiddlyWikiDev
Jed,

I didn't even think about Bob, because it's a binary file that I can't run on a web host's server. The server is not my own, only accessed through the cPanel interface. Do you know how to get started?

TonyM

unread,
Mar 5, 2020, 8:13:09 PM3/5/20
to TiddlyWikiDev
Bob.exe is a binary

Vanila bob is node

Regards
'Tony

TonyM

unread,
Mar 5, 2020, 8:13:17 PM3/5/20
to TiddlyWikiDev
Bimlas,

I understand your needs better now, please consider this approach, which I am confident should work, 
  • it is I believe technically feasible
  • but needs some technical PHP and saver help.
  • In your example case you would not need a serial editing mechanism.
The current tw-receiver allows single file wikis save to php server. Typically all our savers for single file wikis, just save the monolithic wikifile. 
  • There is already sufficient tools within tiddlywiki to save as another filename, using a different filter and even different templates for the save.
  • I have long thought that it should be trivial to introduce a plugin with the ability to save and read other files to/from a PHP server (if the passphrase is available)
  • Using custom or available templates you could save one, more or all tiddlers as json, text and preformatted static html that your other website has references to, allowing "display on a web page independently". Basically these additional "exported" files get served by the PHP server not tiddlywiki as with node.
  • Such a facility could be used to develop a checkin/out or tiddlywiki lock allowing single file wikis with multiple to be restricted to serial editing.
Security,
  • With the tw-receiver pass phrase you are authorised to write to disk only if you have that
  • When using single file wikis the key gaps with bob is dealing with referencing single tiddlers and contention when you have more than one potential editor
    • Being able to export to the php server would allow you to publish single tiddlers
    • A lock and serial editing layer can address contention for single file wikis.
  • Additional supporting php could be added to restrict the saving from tiddlywiki to particular folders or file names either publicly writable or only authenticated. 
  • Perhaps we could build a method to save a named users modified tiddlers to their own folder and load or import them (with selective application) for some or all users.
    • This would allow the contribution of content independent from the core wiki, and be mediated by the authorised editor.
    • Such as comments, form filled tiddlers, and more.
  • You could have a hidden secure editable single file tiddlywiki that is published to a seperate file on the server that is publicly accessible with or without local storage and other plugins activated.
  • Innerwiki plugin may be an option for generating a public version, perhaps if the tiddlywiki is not too big.
Have you seen the core plugin "Auto download modified tiddlers"  $:/plugins/tiddlywiki/savetrail?
  • I could imagine a version of this able to use the operational saver, eg php perhaps saving flagged tiddlers only and according to a nominated template raw or rendered.

There may be some resistance to this because some would say "It breaks the single file wiki" model, but in many ways it does not, it just allows the export, externalising and import of content, which accross time is a multi-user function. The alternative method available now is to move to NODE which already breaks the single file model.

Another, perhaps unnecessary, approach if the above one will not be achievable (unlikely), is tiddlers can contain full html that interacts with php and server based scripting, and if necessary via an iframe. It would be possible to build a server based solution embedded within tiddlywiki that publishes content to files to the server as desired by you.

Regards
Tony

TonyM

unread,
Mar 5, 2020, 8:28:02 PM3/5/20
to TiddlyWikiDev
Post script

I would add to the above reply;
  • The ability to save individual files to the server could be made available to all single file savers and servers not just php given the users have the access rights to do so.
    • This could permit a serial editing feature on all platforms.
  • However a PHP solution is possibly suitable for the most server platforms available.
  • Typically this save mechanism would only be to the current folder or a subfolder (a fair limitation)
  • The "import named file" mechanism we would need to programmatically pull in an external file, and turn it into a tiddler, such as for a lock mechanism would also be able to be used to import content, rss feeds, the output of other content.
  • In tiddlywiki one could use HTML/Php solutions hosted on the server to manage interaction 
    • eg WordPress but then the tiddlywiki could load and or edit and save from a database, file or URL thus consuming or publishing wordpress content.
    • WordPress is the most prolific CMS available and common on PHP servers.
    • You can embed tiddlywikis into wordpress as well.
Regards
Tony
Reply all
Reply to author
Forward
0 new messages