static void Main(string[] args) { Server server = new Server(8000); server.listen(RequestType.get, new Regex("^/api/(.+)/(.+)$"), (match, context) => { }); server.listen(RequestType.get, new Regex("^/api/(.+)$"), (match, context) => { }); server.serveStatic("./public"); server.start();//enters infinite loop }