run server when main