@@ -88,6 +88,22 @@ import Node.Buffer (Buffer)
8888import Node.HTTP (Request , Response , Server , HTTP )
8989import Unsafe.Coerce (unsafeCoerce )
9090
91+ -- | Create an HTTPS server, given the SSL options and a function to be executed
92+ -- | when a request is received.
93+ foreign import createServerImpl ::
94+ forall eff .
95+ Foreign ->
96+ (Request -> Response -> Eff (http :: HTTP | eff ) Unit ) ->
97+ Eff (http :: HTTP | eff ) Server
98+
99+ -- | Create an HTTPS server, given the SSL options and a function to be executed
100+ -- | when a request is received.
101+ createServer :: forall eff .
102+ Options SSLOptions ->
103+ (Request -> Response -> Eff (http :: HTTP | eff ) Unit ) ->
104+ Eff (http :: HTTP | eff ) Server
105+ createServer = createServerImpl <<< options
106+
91107-- | The type of HTTPS server options
92108data SSLOptions
93109
@@ -264,19 +280,3 @@ secureOptions = opt "secureOptions"
264280-- | See the [node docs](https://nodejs.org/api/tls.html#tls_tls_createsecurecontext_options)
265281sessionIdContext :: Option SSLOptions String
266282sessionIdContext = opt " sessionIdContext"
267-
268- -- | Create an HTTPS server, given the SSL options and a function to be executed
269- -- | when a request is received.
270- foreign import createServerImpl ::
271- forall eff .
272- Foreign ->
273- (Request -> Response -> Eff (http :: HTTP | eff ) Unit ) ->
274- Eff (http :: HTTP | eff ) Server
275-
276- -- | Create an HTTPS server, given the SSL options and a function to be executed
277- -- | when a request is received.
278- createServer :: forall eff .
279- Options SSLOptions ->
280- (Request -> Response -> Eff (http :: HTTP | eff ) Unit ) ->
281- Eff (http :: HTTP | eff ) Server
282- createServer = createServerImpl <<< options
0 commit comments