Skip to main content
Version: Next

wrapServer()

Home > @backstage/backend-openapi-utils > wrapServer

!!! THIS CURRENTLY ONLY SUPPORTS SUPERTEST !!! Setup a server with a custom OpenAPI proxy. This proxy will capture all requests and responses and make sure they conform to the spec.

Signature:

function wrapServer(app: Express): Promise<Server>;

Parameters

Parameter

Type

Description

app

Express

express server, needed to ensure we have the correct ports for the proxy.

**Returns:**

Promise<Server>

  • a configured HTTP server that should be used with supertest.