diff --git a/packages/apollo-server/src/index.ts b/packages/apollo-server/src/index.ts index b7a114eca48..272823c24bb 100644 --- a/packages/apollo-server/src/index.ts +++ b/packages/apollo-server/src/index.ts @@ -16,38 +16,24 @@ export * from './exports'; export class ApolloServer extends ApolloServerBase { // here we overwrite the underlying listen to configure // the fallback / default server implementation - async listen( - opts: ListenOptions & { - onHealthCheck?: (req: Request) => Promise; - disableHealthCheck?: boolean; - bodyParserConfig?: OptionsJson; - cors?: CorsOptions; - } = {}, - ): Promise { - const { - disableHealthCheck, - bodyParserConfig, - onHealthCheck, - cors, - ...listenOpts - } = opts; - + async listen(opts: ListenOptions = {}): Promise { // we haven't configured a server yet so lets build the default one // using express if (!this.getHttp) { const app = express(); + //provide generous values for the getting started experience await registerServer({ app, path: '/', server: this, - disableHealthCheck, - bodyParserConfig, - onHealthCheck, - cors, + bodyParserConfig: { limit: '50mb' }, + cors: { + origin: '*', + }, }); } - return super.listen(listenOpts); + return super.listen(opts); } }