Run server in main thread