-
Notifications
You must be signed in to change notification settings - Fork 12k
Description
🚀 Feature request
What modules are relevant for this feature request?
- builders
- common
- express-engine
Description
I'd like to use Angular server side outside of nodejs, because it's intended to be delivered via web frameworks or gateways (like Spring or ASP.NET Core), but those are often not in nodejs.
In my case I'd like to be able run Angular on something like GraalJS (GraalVM can run both JVM and JS) or maybe with some WASM-based JS engine to directly integrate with the backend applications.
The current state with something like GraalJS actually doesn't look too bad, but it's pretty hard to build drop-in replacements for all the things and debug all of that.
Describe the solution you'd like
I don't have the overview, whether this is even possible, but what I'd imagine ideally would be some sort of RuntimeAdapter
interface that specifies all the host features required by the CommonEngine
and then a NodeJsAdapter
that is passed by default and implements everything using all the functions currently implemented using nodejs built-in modules and then one can optionally specify a custom adapter that works for their environment, whatever that may be.
Describe alternatives you've considered
Patching all the nodejs built-in modules with custom implementations is kinda maybe possible, but it's quite the project and kinda fragile and messy and definitely not safe from breaking changes.
Scope
This issue is about the core engine not depending on node.js. It is not about alternative platforms this engine could be used in nor is the goal for Angular to provide any Integrations with specific platforms. It is merely the option to have the APIs so that either all developers or the Angular team itself can even entertain to build those kinds of platform support.