Sign inSign up

akiel/hap-todo

By akiel

•Updated almost 11 years ago

Example ToDo Service demonstrating Hypermedia Application Protocol (HAP).

Image
0

464

akiel/hap-todo repository overview

This software is ALPHA.

⁠HAP ToDo

Build Status

Example ToDo Service demonstrating the Hypermedia Application Protocol⁠.

⁠Hosted HAP ToDo

A hosted version of HAP ToDo is available here⁠. It's open to everyone and has only a volatile in-memory database. So don't expect it to hold your example data. The best way to try out HAP ToDo is by using the HAP Browser⁠ and entering hap-todo.alexanderkiel.net in the address bar.

⁠Walkthrough

A walkthrough explaining HAP by using HAP ToDo as example is available here⁠.

⁠Usage with Leiningen

To start the service with leiningen, run the following command

lein with-profile production trampoline run

⁠Usage on Heroku Compatible PaaS

This application uses the following environment vars:

  • PORT - the port to listen on

If you have foreman⁠ installed you can create an .env file listing the environment vars specified above and just type foreman start.

⁠Docker Image

There is a docker image of HAP ToDo available on Docker Hub⁠. You can run the latest version using:

docker run -d -p 8080:80 --name hap-todo akiel/hap-todo

⁠Development

You can start a REPL with lein repl. After it is up, go into the user namespace which is located in under dev. There is a comment block "Init Development". Just invoke the function:

(startup)

You should be able to see the ToDo service running at port 8080. If you like to specify a different port, you can do it in the .lein-env file like so

{:port "5004"}

⁠License

Copyright © 2015 Alexander Kiel

Distributed under the Eclipse Public License, the same as Clojure.

Tag summary

Content type

Image

Digest

sha256:221b222e0…

Size

316.9 MB

Last updated

almost 11 years ago

docker pull akiel/hap-todo