move steampi.js to middleware