Current section
5 Versions
Jump to
Current section
5 Versions
Compare versions
36
files changed
+289
additions
-242
deletions
| @@ -3,7 +3,7 @@ | |
| 3 3 | [](https://hex.pm/packages/howdy) |
| 4 4 | [](https://hexdocs.pm/howdy/) |
| 5 5 | |
| 6 | - A simple but powerful webserver build on top of Cowboy. Howdy's goal is to make create web servers using Gleam as easy as it can be. |
| 6 | + A simple API on top of the [Mist](https://hex.pm/packages/mist) webserver |
| 7 7 | |
| 8 8 | ## Installation |
| @@ -1,24 +1,24 @@ | |
| 1 1 | name = "howdy" |
| 2 | - version = "0.1.1" |
| 2 | + version = "0.1.2" |
| 3 3 | |
| 4 4 | # Fill out these fields if you intend to generate HTML documentation or publish |
| 5 5 | # your project to the Hex package manager. |
| 6 6 | # |
| 7 7 | licences = ["Apache-2.0"] |
| 8 | - description = "A simple webservice designed with an intuative API to try and take away a lot of the boilerplate in using a web server with Gleam" |
| 8 | + description = "A simple and easy to use API created on top of the (Mist)[https://hex.pm/packages/mist] web server" |
| 9 9 | repository = { type = "github", user = "mikeyjones", repo = "howdy" } |
| 10 | - # links = [{ title = "Website", href = "https://gleam.run" }] |
| 10 | + links = [{ title = "Server", href = "https://github.com/mikeyjones/howdy/blob/main/manual/server.md" }, { title = "Router", href = "https://github.com/mikeyjones/howdy/blob/main/manual/routes.md" }, { title = "Context", href = "https://github.com/mikeyjones/howdy/blob/main/manual/context.md" }] |
| 11 11 | |
| 12 12 | [dependencies] |
| 13 13 | gleam_stdlib = "~> 0.21" |
| 14 | - cowboy = "~> 2.9" |
| 15 | - gleam_cowboy = "~> 0.4" |
| 16 14 | gleam_erlang = "~> 0.9" |
| 17 15 | gleam_otp = "~> 0.4" |
| 18 16 | gleam_http = "~> 3.0" |
| 19 17 | gleam_json = "~> 0.4" |
| 20 18 | mimerl = "~> 1.2" |
| 21 19 | howdy_uuid = "~> 0.1" |
| 20 | + mist = "~> 0.4" |
| 21 | + gleam_hackney = "~> 0.2" |
| 22 22 | |
| 23 23 | [dev-dependencies] |
| 24 24 | gleeunit = "~> 0.6" |
| @@ -1,38 +1,26 @@ | |
| 1 1 | {<<"name">>, <<"howdy">>}. |
| 2 2 | {<<"app">>, <<"howdy">>}. |
| 3 | - {<<"version">>, <<"0.1.1">>}. |
| 4 | - {<<"description">>, <<"A simple webservice designed with an intuative API to try and take away a lot of the boilerplate in using a web server with Gleam">>}. |
| 3 | + {<<"version">>, <<"0.1.2">>}. |
| 4 | + {<<"description">>, <<"A simple and easy to use API created on top of the (Mist)[https://hex.pm/packages/mist] web server">>}. |
| 5 5 | {<<"licenses">>, [<<"Apache-2.0">>]}. |
| 6 6 | {<<"build_tools">>, [<<"gleam">>]}. |
| 7 7 | {<<"links">>, [ |
| 8 | + {<<"Server">>, <<"https://github.com/mikeyjones/howdy/blob/main/manual/server.md">>}, |
| 9 | + {<<"Router">>, <<"https://github.com/mikeyjones/howdy/blob/main/manual/routes.md">>}, |
| 10 | + {<<"Context">>, <<"https://github.com/mikeyjones/howdy/blob/main/manual/context.md">>}, |
| 8 11 | {<<"Repository">>, <<"https://github.com/mikeyjones/howdy">>} |
| 9 12 | ]}. |
| 10 13 | {<<"requirements">>, [ |
| 11 | - {<<"gleam_http">>, [ |
| 12 | - {<<"app">>, <<"gleam_http">>}, |
| 14 | + {<<"gleam_hackney">>, [ |
| 15 | + {<<"app">>, <<"gleam_hackney">>}, |
| 13 16 | {<<"optional">>, false}, |
| 14 | - {<<"requirement">>, <<"~> 3.0">>} |
| 17 | + {<<"requirement">>, <<"~> 0.2">>} |
| 15 18 | ]}, |
| 16 | - {<<"gleam_stdlib">>, [ |
| 17 | - {<<"app">>, <<"gleam_stdlib">>}, |
| 18 | - {<<"optional">>, false}, |
| 19 | - {<<"requirement">>, <<"~> 0.21">>} |
| 20 | - ]}, |
| 21 | - {<<"gleam_cowboy">>, [ |
| 22 | - {<<"app">>, <<"gleam_cowboy">>}, |
| 19 | + {<<"gleam_otp">>, [ |
| 20 | + {<<"app">>, <<"gleam_otp">>}, |
| 23 21 | {<<"optional">>, false}, |
| 24 22 | {<<"requirement">>, <<"~> 0.4">>} |
| 25 23 | ]}, |
| 26 | - {<<"gleam_erlang">>, [ |
| 27 | - {<<"app">>, <<"gleam_erlang">>}, |
| 28 | - {<<"optional">>, false}, |
| 29 | - {<<"requirement">>, <<"~> 0.9">>} |
| 30 | - ]}, |
| 31 | - {<<"mimerl">>, [ |
| 32 | - {<<"app">>, <<"mimerl">>}, |
| 33 | - {<<"optional">>, false}, |
| 34 | - {<<"requirement">>, <<"~> 1.2">>} |
| 35 | - ]}, |
| 36 24 | {<<"howdy_uuid">>, [ |
| 37 25 | {<<"app">>, <<"howdy_uuid">>}, |
| 38 26 | {<<"optional">>, false}, |
| @@ -43,15 +31,30 @@ | |
| 43 31 | {<<"optional">>, false}, |
| 44 32 | {<<"requirement">>, <<"~> 0.4">>} |
| 45 33 | ]}, |
| 46 | - {<<"gleam_otp">>, [ |
| 47 | - {<<"app">>, <<"gleam_otp">>}, |
| 34 | + {<<"gleam_http">>, [ |
| 35 | + {<<"app">>, <<"gleam_http">>}, |
| 36 | + {<<"optional">>, false}, |
| 37 | + {<<"requirement">>, <<"~> 3.0">>} |
| 38 | + ]}, |
| 39 | + {<<"gleam_erlang">>, [ |
| 40 | + {<<"app">>, <<"gleam_erlang">>}, |
| 41 | + {<<"optional">>, false}, |
| 42 | + {<<"requirement">>, <<"~> 0.9">>} |
| 43 | + ]}, |
| 44 | + {<<"mimerl">>, [ |
| 45 | + {<<"app">>, <<"mimerl">>}, |
| 46 | + {<<"optional">>, false}, |
| 47 | + {<<"requirement">>, <<"~> 1.2">>} |
| 48 | + ]}, |
| 49 | + {<<"gleam_stdlib">>, [ |
| 50 | + {<<"app">>, <<"gleam_stdlib">>}, |
| 51 | + {<<"optional">>, false}, |
| 52 | + {<<"requirement">>, <<"~> 0.21">>} |
| 53 | + ]}, |
| 54 | + {<<"mist">>, [ |
| 55 | + {<<"app">>, <<"mist">>}, |
| 48 56 | {<<"optional">>, false}, |
| 49 57 | {<<"requirement">>, <<"~> 0.4">>} |
| 50 | - ]}, |
| 51 | - {<<"cowboy">>, [ |
| 52 | - {<<"app">>, <<"cowboy">>}, |
| 53 | - {<<"optional">>, false}, |
| 54 | - {<<"requirement">>, <<"~> 2.9">>} |
| 55 58 | ]} |
| 56 59 | ]}. |
| 57 60 | {<<"files">>, [ |
| @@ -1,5 +1,6 @@ | |
| 1 1 | -record(context, { |
| 2 2 | url :: list(howdy@url_parser:url_segment()), |
| 3 3 | request :: gleam@http@request:request(bitstring()), |
| 4 | - user :: gleam@option:option(howdy@context@user:user()) |
| 4 | + user :: gleam@option:option(howdy@context@user:user()), |
| 5 | + config :: any() |
| 5 6 | }). |
| @@ -1,5 +1,5 @@ | |
| 1 1 | -record(custom, { |
| 2 2 | method :: binary(), |
| 3 3 | route :: binary(), |
| 4 | - func :: fun((howdy@context:context()) -> gleam@http@response:response(gleam@bit_builder:bit_builder())) |
| 4 | + func :: fun((howdy@context:context(any())) -> gleam@http@response:response(gleam@bit_builder:bit_builder())) |
| 5 5 | }). |
Loading more files…