MCPcopy Create free account
hub / github.com/cypress-io/cypress / start

Function start

packages/https-proxy/test/helpers/https_server.ts:25–39  ·  view source on GitHub ↗
(port: number, onRequest?: (req: IncomingMessage, res: ServerResponse) => void)

Source from the content-addressed store, hash-verified

23}
24
25export const start = (port: number, onRequest?: (req: IncomingMessage, res: ServerResponse) => void) => {
26 return new Promise<https.Server>((resolve) => {
27 const srv = create(onRequest)
28
29 allowDestroy(srv)
30
31 servers.push(srv)
32
33 srv.listen(port, () => {
34 console.log(`server listening on port: ${port}`)
35
36 resolve(srv)
37 })
38 })
39}
40
41export const stop = async () => {
42 const stopServer = (srv: https.Server) => {

Callers

nothing calls this directly

Calls 6

allowDestroyFunction · 0.90
createFunction · 0.70
logMethod · 0.65
resolveFunction · 0.50
pushMethod · 0.45
listenMethod · 0.45

Tested by

no test coverage detected