How to call Fortran routines from JavaScript using Node.js

Looks interesting, thanks. You write

It’s also worth mentioning that, because Fortran functions can only return scalar values and not, e.g., pointers to arrays, general best practice is to expose Fortran functions as subroutines, which are the equivalent of C functions returning void and which allow passing pointers for storing output return values.

You may be correct that it is better to expose Fortran procedures as subroutines, but it is not true that “Fortran functions can only return scalar values”. Both intrinsic and user-written functions can return arrays.