Got it working!

Had to modify the express middleware a bit to make it work, and add a
special content-negotiation workaround when using flash, but it works.