@@ -91,6 +91,22 @@ import Unsafe.Coerce (unsafeCoerce)
9191-- | The type of HTTPS server options
9292data SSLOptions
9393
94+ -- | Create an HTTPS server, given the SSL options and a function to be executed
95+ -- | when a request is received.
96+ foreign import createServerImpl ::
97+ forall eff .
98+ Foreign ->
99+ (Request -> Response -> Eff (http :: HTTP | eff ) Unit ) ->
100+ Eff (http :: HTTP | eff ) Server
101+
102+ -- | Create an HTTPS server, given the SSL options and a function to be executed
103+ -- | when a request is received.
104+ createServer :: forall eff .
105+ Options SSLOptions ->
106+ (Request -> Response -> Eff (http :: HTTP | eff ) Unit ) ->
107+ Eff (http :: HTTP | eff ) Server
108+ createServer = createServerImpl <<< options
109+
94110-- | See the [node docs](https://nodejs.org/api/tls.html#tls_tls_createserver_options_secureconnectionlistener)
95111handshakeTimeout :: Option SSLOptions Int
96112handshakeTimeout = opt " handshakeTimeout"
@@ -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