move js section
@@ -8,6 +8,14 @@ Creating your own `khcheck` is very easy. If you are using Go, we have an easy
An example check with working Dockerfile is available to use as an example [here](../cmd/test-external-check/main.go).
+### Using JavaScript
+
+If you would like to write a check in JavaScript, there is a client for external checks found [here](../clients/js/).
+
+There is also an [example check](../clients/js/example) in the under the same folder with a Dockerfile for reference.
+
+For more information on the external client for JavaScript go [here](../clients/js/README.md).
+
### Using Another Language
Your check only needs to do a few things:
@@ -31,27 +39,6 @@ Simply build your program into a container, `docker push` it to somewhere your c
Clients outside of Go can be found in the [clients directory](../clients).
-#### JavaScript client
-
-If you would like to write a check in JavaScript, there is a client for external checks found [here](../clients/js/).
-
-There is also an [example check](../clients/js/example) in the under the same folder with a Dockerfile for reference.
-
-Example:
-```js
-const kh = require("./kh-client");
-
-try {
- kh.ReportSuccess();
-} catch (err) {
- console.error("Error when reporting success: " + err.message);
- process.exit(1);
-}
-process.exit(0);
-```
-
-For more information on the external client for JavaScript go [here](../clients/js/README.md).
-
### Creating Your `khcheck` Resource
Every check needs a `khcheck` to enable and configure it. As soon as this resource is applied to the cluster, Kuberhealthy will begin running your check. Whenever you make a change, Kuberhealthy will automatically re-load the check and restart any checks currently in progress gracefully.
