Commit 65d11cf7 authored by Corey O'Connor's avatar Corey O'Connor
Browse files

Update README.md

parent 4c6f92d7
......@@ -87,7 +87,7 @@ INFO glngn.server.app.ServerApp$ - application is listening at http://localhos
At this point the standalone server is initialized and ready.
See [docs/Deep Dives](https://gitlab.com/glngn/glngn-server-examples/blob/master/docs/DeepDives.md)
for more information on what exactly that means.
for more details on what happened.
Hit control-C, or TERM the process (there is only one), to shut down the server. This will take a bit
for a nice, coordinated shutdown. Which is preferred. That said, the server is configured to attempt
......@@ -95,7 +95,7 @@ recovery from sudden terminations. Such as killing a container in a kubernetes c
## Examining a Running Server
Even in this default configuration the server provides a few useful routes:
Even in this default configuration the server provides useful routes:
### Health Check
......@@ -107,24 +107,57 @@ OK
This will only return status 200 OK if the server is able to handle requests. Not terribly
interesting so far, but we haven't done much! Nice to verify the server health before proceeding tho.
Worth pointing out that we implicitly requested the text representation of the resource using a `.txt`
suffix. We could have requested another representation, such as json, explicitly or implicitly:
```bash
$ curl -H 'Accept: text/plain' localhost:10000/healthz
OK
$ curl -H 'Accept: application/json' localhost:10000/healthz
{
"memStats" : {
[...]
"ok" : true
}
$ curl localhost:10000/healthz.json
{
"memStats" : {
[...]
"ok" : true
}
```
This pattern is supported throughout: Endpoints will have suffixed versions that imply the expected
representation.
### OpenAPI schema
Let's query for the (current) API schema to see what else there is:
Let's query for the API schema to see what other endpoints there are:
```bash
$ curl http://localhost:10000/openapi.json
{
"openapi" : "3.0.1",
"info" : {
"title" : "dynamic",
"version" : "0.1"
}
"info" : {
"title" : "dynamic",
"version" : "0.1"
},
"paths": {
"/healthz": {
[...]
}
}
[...]
```
Only a few paths are highlighted in the sample output above. Let's touch on those briefly:
1. The `/healthz` route. We've already tried that one
### A Brief Tour
TODO: o over the general types of default routes)
TODO: Go over the general types of default routes)
- `_ops` routes - routes prefixed with a `_`. These are automatically generated.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment