MCPcopy
hub / github.com/FredKSchott/snowpack / createServer

Function createServer

snowpack/src/commands/dev.ts:887–896  ·  view source on GitHub ↗
(responseHandler: http.RequestListener | Http2RequestListener)

Source from the content-addressed store, hash-verified

885 response: http2.Http2ServerResponse,
886 ) => void;
887 const createServer = (responseHandler: http.RequestListener | Http2RequestListener) => {
888 if (credentials) {
889 return http2.createSecureServer(
890 {...credentials!, allowHTTP1: true},
891 responseHandler as Http2RequestListener,
892 );
893 }
894
895 return http.createServer(responseHandler as http.RequestListener);
896 };
897
898 let server: http.Server | http2.Http2Server | undefined;
899 if (port) {

Callers 1

startServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected