diff --git a/examples/mig-example-apps/Counter/README.md b/examples/mig-example-apps/Counter/README.md new file mode 100644 index 0000000..43ff72a --- /dev/null +++ b/examples/mig-example-apps/Counter/README.md @@ -0,0 +1,3 @@ +# Counter + +An example on how to use Reader-pattern with the `mig` library. diff --git a/examples/mig-example-apps/CounterClient/README.md b/examples/mig-example-apps/CounterClient/README.md new file mode 100644 index 0000000..1595612 --- /dev/null +++ b/examples/mig-example-apps/CounterClient/README.md @@ -0,0 +1,4 @@ +# CounterClient + +An example on how to build client and server from the same code + diff --git a/examples/mig-example-apps/HelloClient/README.md b/examples/mig-example-apps/HelloClient/README.md new file mode 100644 index 0000000..32dfa6d --- /dev/null +++ b/examples/mig-example-apps/HelloClient/README.md @@ -0,0 +1,3 @@ +# Hello world server and client + +An example on how to build server and client from the same code. diff --git a/examples/mig-example-apps/HelloWorld/README.md b/examples/mig-example-apps/HelloWorld/README.md new file mode 100644 index 0000000..6bb8e03 --- /dev/null +++ b/examples/mig-example-apps/HelloWorld/README.md @@ -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' +``` diff --git a/examples/mig-example-apps/Html/README.md b/examples/mig-example-apps/Html/README.md new file mode 100644 index 0000000..48cab90 --- /dev/null +++ b/examples/mig-example-apps/Html/README.md @@ -0,0 +1,9 @@ +# Html + +A simple blog post site that servers HTML. +To run use: + +``` +> stack run html-mig-example-app +``` +After server start we can try it out in the browser. Go to [the main page](http://localhost:8085). diff --git a/examples/mig-example-apps/HtmlTemplate/README.md b/examples/mig-example-apps/HtmlTemplate/README.md new file mode 100644 index 0000000..8f43631 --- /dev/null +++ b/examples/mig-example-apps/HtmlTemplate/README.md @@ -0,0 +1,11 @@ +# 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 +``` + +After server start we can try it out in the browser. Go to [the main page](http://localhost:8085). diff --git a/examples/mig-example-apps/JsonApi/README.md b/examples/mig-example-apps/JsonApi/README.md new file mode 100644 index 0000000..0122b0c --- /dev/null +++ b/examples/mig-example-apps/JsonApi/README.md @@ -0,0 +1,12 @@ +# 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 +``` + +After server start we can test it with [Swagger UI](http://localhost:8085/swagger-ui/index.html). + diff --git a/examples/mig-example-apps/RouteArgs/README.md b/examples/mig-example-apps/RouteArgs/README.md new file mode 100644 index 0000000..e69de29 diff --git a/examples/mig-example-apps/RouteArgsClient/README.md b/examples/mig-example-apps/RouteArgsClient/README.md new file mode 100644 index 0000000..02012cd --- /dev/null +++ b/examples/mig-example-apps/RouteArgsClient/README.md @@ -0,0 +1,4 @@ +# RouteArgsClient + +Client with all sorts of inputs +