aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md26
1 files changed, 25 insertions, 1 deletions
diff --git a/README.md b/README.md
index ec0050a..9edbfe1 100644
--- a/README.md
+++ b/README.md
@@ -82,7 +82,31 @@ libraries used are:
## Example Usage
-*TODO*
+The following implements a simple key-value store that uses object
+storage ("buckets") when running in the cloud and a local filesystem
+when running on a development machine.
+```scala
+import xyz.driver.core.init
+
+object Main extends init.SimpleHttpApp {
+
+ lazy val fs = storage("data")
+
+ override def applicationRoute = path("data" / Segment) { key =>
+ post {
+ entity(as[Array[Byte]]) { value =>
+ complete(fs.uploadContent(key, value))
+ }
+ } ~ get {
+ rejectEmptyResponse{
+ complete(fs.content(key))
+ }
+ }
+ }
+
+}
+```
+See [this example project](documentation/example) for a more details.
## Building