Joris Vink 3e84502235 Adjust examples after recent changes.
- New kodev tool generates config with server.pem/key.pem.
- Use proper formats for kore_log().
- Update to new websocket api.
2017-02-25 17:02:39 -08:00
..
2016-07-14 12:34:29 +02:00

This example demonstrates how you can use external libs in your application.

In this case we link against yajl (Yet Another JSON library) in order to parse a JSON string that was POSTed to the server.

Take a peek at conf/build.conf for different build flavors and how to link to other libraries.

Run:

	$ kore run

Test:

	$ curl -i -k -d '{"foo":{"bar": "Hello world"}}' https://127.0.0.1:8888

The result should echo back the foo.bar JSON path value: Hello world.

The yajl repo is available @ https://github.com/lloyd/yajl