run server in the foreground.