Node 20 allows you to compile your app into a single executable along with the entire Node.js core so you can run your apps on systems where node isn’t installed, or your don’t trust the system version.
My question is: Can we have a tw.exe for Windows or similar for Linux/Mac?
At the moment the TW-server boot-process is “file-based”. So the tw code contains several if statements like:
if($tw.node) {
// do node stuff with "hardcoded" file access
}
or
if($tw.browser) {
if(window.require) {
// do browser based module handling
}
} else {
// If we don't have a module with that name, let node.js try to find it
return require(moduleName);
}
and so on. … As far as I do understand the docs (which I don’t) we would need to create a very special node server version, which is bundled into 1 file, which can be “injected” into node.exe. …
So it’s probably much much more work, than it looks like. Creating a “Hello World” is simple, but useless.
-m
I think all that this would offer us is potentially simpler installs of tools like TiddlyWikiDesktop (which I have only barely touched; so it may not apply.) Essentially it would change instructions like:
Download and install Node
Download our application
Step 3
…
Into ones like this:
Download our application
Step 2
…
There are times when that’s helpful, but it’s not a huge win.
This is a good idea. The more I research distributed networking, the more I realize that TW instances running under node should act as Clients. I understand why under the web2 model the node-server<->browser-client relationship was modeled that way. But with web3 concepts its more like node-client->distributed-network/WNFS<-browser-client, and now you can scale both sides up as nodes in a multiplayer network. Spin up a node client on your PC to do data processing & then call a LLM api & then inject the result of that as a tiddler in your wiki. The sync layer then auto-distrubutes that to all other clients (browser or node).