I’m not smart enough to understand this. I love swift, vapor and node individually, I don’t get it together
NodeJS has had FFI for over a decade that allows you to call functions in .dylib/.a/.dll on Mac/Linux/Windows. I've used it extensively to link with libraries provided by USB device manufacturers to avoid direct USB interfacing.
See:
https://www.npmjs.com/package/ffi
This let's you call Node from inside Swift.
> Cross-platform: NodeSwift works not only on macOS, but also on Linux, Windows, and even iOS!
Now I'm curious about the iOS bit. Is that intended for React Native?
Surely you have considered TypeScript for your Node project then?