socket:autospawn(function(client) were giving an infinite loop, so the http server was started. Now it is called as a function instead and runnning as a thread instead.