A toy payment system in Clojure/ClojureScript, based on Duct.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dev
docker
resources
src
test/clj/pay_me/endpoint
.gitignore
README.md
project.clj

README.md

pay-me

Pay-Me is a small example of a dummy payment provider service, built with Clojure and Duct. The different components are hooked up using core/async channels.

Developing

$> lein cljsbuild auto

and

lein repl
user=> (go)

The service now runs on http://localhost:3000.

When you make changes to your source files, use reset to reload any modified files and restart the server.

user=> (reset)
:reloading (...)
:started

Deployment

Use lein uberimage to package the service as a Docker image. Note that the uberimage plugin expects the Docker API to be available on http://127.0.0.1:2375. At least on OS X, a workaround is necessary to expose the API.

When running in the Docker container, the application is started using a shell script. Logging is redirected to /var/log/pay-me/pay-me.log. This is simply because this is the pattern of logging I tend to follow when deploying Docker containers (gather logs on host, store them somewhere).