diff --git a/README.md b/README.md index 6dcfbfa..6a6f47f 100644 --- a/README.md +++ b/README.md @@ -74,8 +74,8 @@ Example libraries You can find example libraries under **_examples/_**. -The examples should be compiled using the supplied **build.sh** scripts -and assume you have installed the header files using make install. +The examples contain a README file with instructions on how +to build or use them. I apologize for unclear examples or documentation, I am working on improving those. diff --git a/examples/generic/README.md b/examples/generic/README.md new file mode 100644 index 0000000..11c81e4 --- /dev/null +++ b/examples/generic/README.md @@ -0,0 +1,11 @@ +Generic Kore application that shows off a few things: + +* File uploads (/upload) +* Authentication blocks (/private) +* base64 encoding tests (/b64test) +* Parameter validator tests (/params-test) + +Run: +``` + # kore run +``` diff --git a/examples/pgsql/README.md b/examples/pgsql/README.md new file mode 100644 index 0000000..41eb5bc --- /dev/null +++ b/examples/pgsql/README.md @@ -0,0 +1,9 @@ +Kore pgsql example. + +* Performs 2 async pgsql queries. +* You must set the connection string before running + +Run: +``` + # kore run +``` diff --git a/examples/tasks/README b/examples/tasks/README deleted file mode 100644 index 7825083..0000000 --- a/examples/tasks/README +++ /dev/null @@ -1,3 +0,0 @@ -Compile this example using: - -# env KORE_LDFLAGS="-I/path/to/libcurl -lcurl" diff --git a/examples/tasks/README.md b/examples/tasks/README.md new file mode 100644 index 0000000..5f5b24e --- /dev/null +++ b/examples/tasks/README.md @@ -0,0 +1,21 @@ +Kore task example. + +This example creates an asynchronous task from the page handler +that performs a POST to the same server and fetches its data +before returning to the client. + +Build: +``` + # env KORE_LDFLAGS="-I/path/to/libcurl -lcurl" kore build +``` + +Run: +``` + # kore run +``` + +Test: +``` + # curl -i -k https://127.0.0.1:8888/?id=astring + The returned data must match what you supplied in user ([a-z] string) +```