-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
70 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Counter | ||
|
||
An example on how to use Reader-pattern with the `mig` library. |
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,4 @@ | ||
# CounterClient | ||
|
||
An example on how to build client and server from the same code | ||
|
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,3 @@ | ||
# Hello world server and client | ||
|
||
An example on how to build server and client from the same code. |
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,29 @@ | ||
# Hello wrold server | ||
|
||
An example of the most basic JSON API server | ||
that has two routes. It can greet the user and say good bye. | ||
|
||
We can use `curl` to test it. | ||
Run it with: | ||
|
||
``` | ||
> stack run hello-world-mig-example-app | ||
``` | ||
|
||
After server start we can test it with [Swagger UI](http://localhost:8085/swagger-ui/index.html). | ||
Or with curl: | ||
|
||
Curl for hello route | ||
``` | ||
curl -X 'GET' \ | ||
'http://localhost:8085/api/v1/hello' \ | ||
-H 'accept: application/json' | ||
``` | ||
|
||
Curl for bye route | ||
|
||
``` | ||
curl -X 'GET' \ | ||
'http://localhost:8085/api/v1/bye?user=alice' \ | ||
-H 'accept: application/json' | ||
``` |
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,9 @@ | ||
# Html | ||
|
||
A simple blog post site that servers HTML. | ||
To run use: | ||
|
||
``` | ||
> stack run html-mig-example-app | ||
``` |
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,9 @@ | ||
# HtmlTemplate | ||
|
||
A variation of `Html` example with safe URLs and HTML-templates based on mustache. | ||
|
||
To run use: | ||
|
||
``` | ||
> stack run html-template-mig-example-app | ||
``` |
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,9 @@ | ||
# JsonApi | ||
|
||
A weather forecast JSON API example. It shows how to build JSON API servers. | ||
|
||
To run use: | ||
|
||
``` | ||
> stack run json-api-mig-example-app | ||
``` |
Empty file.
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,4 @@ | ||
# RouteArgsClient | ||
|
||
Client with all sorts of inputs | ||
|