Replace web server in python with js