I think the most important info is this: Single executable applications | Node.js v20.0.0 Documentation
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