betterserver code merged in normal server.js