REST API based template project written in Clojure using Compojure and Components library. This service exposes two endpoints, /ping and /hello. This template project can be extended by adding more routes and adding components for required dependencies.
Refer to this project as it uses Elasticsearch Component along with components used in this template project. It exposes CRUD APIs using Elasticsearch.
You will need Java, Leiningen to run this project.
To start a API server, run below command:
lein run
This will start the server on Port 9099. Run below curl command to verify
curl http://localhost:9099/ping
Build the Jar using below command
lein uberjar
and then run the following command to start the API server
java -jar java -jar target/api-service-template-0.1.0-standalone.jar
Use the curl command mentioned above to verify.
lein test :all
....
Ran 3 tests containing 5 assertions.
0 failures, 0 errors.