Skip to content

Commit 868e668

Browse files
author
Connor Prussin
committed
Move important functions first
1 parent 5e0569f commit 868e668

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/Node/HTTP/Secure.purs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,22 @@ import Unsafe.Coerce (unsafeCoerce)
9191
-- | The type of HTTPS server options
9292
data 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)
95111
handshakeTimeout :: Option SSLOptions Int
96112
handshakeTimeout = opt "handshakeTimeout"
@@ -264,19 +280,3 @@ secureOptions = opt "secureOptions"
264280
-- | See the [node docs](https://nodejs.org/api/tls.html#tls_tls_createsecurecontext_options)
265281
sessionIdContext :: Option SSLOptions String
266282
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

Comments
 (0)