@@ -91,6 +91,22 @@ import Unsafe.Coerce (unsafeCoerce)
91
91
-- | The type of HTTPS server options
92
92
data SSLOptions
93
93
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
+
94
110
-- | See the [node docs](https://nodejs.org/api/tls.html#tls_tls_createserver_options_secureconnectionlistener)
95
111
handshakeTimeout :: Option SSLOptions Int
96
112
handshakeTimeout = opt " handshakeTimeout"
@@ -264,19 +280,3 @@ secureOptions = opt "secureOptions"
264
280
-- | See the [node docs](https://nodejs.org/api/tls.html#tls_tls_createsecurecontext_options)
265
281
sessionIdContext :: Option SSLOptions String
266
282
sessionIdContext = 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