Skip to content

Commit 1d3890c

Browse files
authored
Merge pull request #17 from cprussin/move-important-secure-functions-first
Move important functions first
2 parents 5e0569f + f59e5fe commit 1d3890c

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/Node/HTTP/Secure.purs

+16-16
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,22 @@ import Node.Buffer (Buffer)
8888
import Node.HTTP (Request, Response, Server, HTTP)
8989
import 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
92108
data SSLOptions
93109

@@ -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)