run api server in background