Using TW on a server with node ... but without terminal.

123 views
Skip to first unread message

Jan

unread,
Jan 26, 2021, 4:33:52 PM1/26/21
to TiddlyWiki
Hi,
I would like to use a node installation of tw, but my internet-host does
not allow me to use the terminal.
I only can upload files via ftp and point node.js to an app.js
Are there any implementations for such a scenario?

Best wishes
Jan


Jed Carty

unread,
Jan 27, 2021, 7:48:40 AM1/27/21
to TiddlyWiki
This should be possible, but you would need to write a quick app.js file.

Note that I haven't tested this, but I have done almost the same thing for the secure server setup I made.

Put the TiddlyWiki5 folder on your server, then your app.js file next to that folder. In the app.js file put:


$tw = require("./TiddlyWiki5/boot/boot.js").TiddlyWiki()
const args = ['/path/to/wiki', '--listen']
$tw.boot.argv = args
$tw.boot.boot()

then that should give you the same result as if you has terminal access and typed 

node ./TiddlyWiki5/tiddlywiki.js /path/to/wiki --listen

so change /path/to/wiki to the path to the wiki you want and if you want to pass any more arguments to the listen command add them to the args array in the order you want them.

Remember that unless you add the credentials argument this has no access controls unless your server provides them separately.


Jan Johannpeter

unread,
Jan 28, 2021, 9:48:13 AM1/28/21
to tiddlyWiki
Hi Jed,
thanks for your answer, I tried test it, but since yesterday evening I am also caught in a medium hardware desaster, which slows me down a lot.
Would deploying TW like that also work for your BOB-Server?

Best Wishes Jan


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/53636f7e-b79a-48dd-864d-63d17539b115n%40googlegroups.com.

Jed Carty

unread,
Jan 29, 2021, 2:55:30 PM1/29/21
to TiddlyWiki
If it works for the normal server it should work with Bob. The secure server version uses a script like that to start up the wiki as part of a larger application so the idea works, the only question is the specifics of your host.
Reply all
Reply to author
Forward
0 new messages