com.netflix.karyon.examples.hellonoss.server.jersey.README.md Maven / Gradle / Ivy
Hello Netflix OSS (Jersey)
======
A helloworld using jersey based endpoints.
Apart from the common modules used by all examples, this example uses the following karyon module:
* _[karyon-jersey-blocking](../../karyon-jersey-blocking) extension_: For jersey based resources.
Running the example
===================
This example can be run using gradle.
`../gradlew runJerseyHelloNOSS`
What to see
===========
After the server starts, you can use the following commands to verify the server's endpoints:
* _Hello to 'newbee'_:
```
curl -H"MY-USER-ID: nkant" "http://localhost:8888/hello/to/newbee"
```
Which will produce the output:
```
{"Message":"Hello newbee from Netflix OSS"}
```
* _Hello to Anonymous_:
```
curl -H"MY-USER-ID: nkant" "http://localhost:8888/hello/"
```
Which will produce the output:
```
{"Message":"Hello from Netflix OSS"}
```
* _Healthcheck_:
```
curl -v "http://localhost:8888/healthcheck"
```
Which will produce the output:
```
> GET /healthcheck HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8y zlib/1.2.5
> Host: localhost:8888
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/json
< Transfer-Encoding: chunked
<
```
This demonstrate the healthcheck endpoint added by this application and using karyon's `HealthCheckHandler` contract.
* _Admin console_
Use the URL: `http://localhost:8077/` to navigate to karyon's admin console.
This will take you to the karyon admin user interface.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy