-
Notifications
You must be signed in to change notification settings - Fork 440
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #380 from bloomberg/http_server_using_nodejs
[feature] finally a working http server using nodejs!!
- Loading branch information
Showing
11 changed files
with
105 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
(** | ||
[%bs (req Js.t * resp Js.t => unit ) => server Js.t | ||
] | ||
A syntax extension | ||
(req Js.t -> resp Js.t -> unit [@uncurry] )-> server Js.t [@uncurry] | ||
type a = [%bs (req Js.t * resp Js.t => unit ) => server Js.t ] | ||
*) | ||
|
||
|
||
|
||
|
||
|
||
type req | ||
type resp = < | ||
statusCode__set : int Js.set ; | ||
setHeader : string * string -> unit [@uncurry]; | ||
end__ : string -> unit [@uncurry] | ||
> | ||
|
||
type server = < | ||
listen : int * string * (unit -> unit [@uncurry]) -> unit [@uncurry] | ||
> | ||
|
||
|
||
|
||
type http = < | ||
createServer : (req Js.t * resp Js.t -> unit [@uncurry]) -> server Js.t [@uncurry] | ||
> | ||
|
||
|
||
external http : http Js.t = "http" [@@bs.val_of_module ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -295,4 +295,5 @@ ocaml_proto_test | |
test_unsafe_obj_ffi_ppx | ||
|
||
ppx_apply_test | ||
test_http_server | ||
test_http_server | ||
http_types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,2 @@ | ||
|
||
type req | ||
type resp = < | ||
statusCode__set : int Js.set ; | ||
setHeader : string * string -> unit [@uncurry]; | ||
end__ : string -> unit [@uncurry] | ||
> | ||
|
||
type server = < | ||
listen : int * string * (unit -> unit [@uncurry]) -> unit [@uncurry] | ||
> | ||
|
||
|
||
|
||
type http = < | ||
createServer : (req Js.t * resp Js.t -> unit [@uncurry]) -> server Js.t [@uncurry] | ||
> | ||
|
||
val create_server : http Js.t -> unit | ||
(* val create_server : Http_types.http Js.t -> unit *) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// GENERATED CODE BY BUCKLESCRIPT VERSION 0.3 , PLEASE EDIT WITH CARE | ||
'use strict'; | ||
|
||
|
||
|
||
/* No side effect */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule ocaml
updated
from 362352 to a09ecf