easymidi is a package on npm that allows you to watch real midi inputs and outputs as well as create your own midi virtual inputs and outputs. This means that you can use JavaScript to create a virtual midi instrument and send midi notes to any DAW (in my case, Ableton Live).
I made a quick video to show exactly how this process is done and the gotchas around setting it up for your first time: