Cardano-cli transaction submit error

Hmm, yes, then writing it as a nodejs application might be closer to what you are comfortable with:

All of that would be more elegant than calling out to the shell to cardano-cli in my opinion.