{"id":22323756,"url":"https://github.com/wdhowe/http-service-lein","last_synced_at":"2026-05-02T15:32:09.656Z","repository":{"id":52971579,"uuid":"356766927","full_name":"wdhowe/http-service-lein","owner":"wdhowe","description":"HTTP service template with Leiningen.","archived":false,"fork":false,"pushed_at":"2024-03-22T03:12:31.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T07:13:16.458Z","etag":null,"topics":["clojure","docker","http-api","http-server","lein","leiningen","template"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wdhowe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-11T04:34:04.000Z","updated_at":"2024-02-07T04:12:52.000Z","dependencies_parsed_at":"2024-03-22T02:44:59.759Z","dependency_job_id":"6cdf11fb-7aa0-4c4e-8976-cbbcbf21b2e4","html_url":"https://github.com/wdhowe/http-service-lein","commit_stats":null,"previous_names":[],"tags_count":3,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdhowe%2Fhttp-service-lein","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdhowe%2Fhttp-service-lein/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdhowe%2Fhttp-service-lein/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wdhowe%2Fhttp-service-lein/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wdhowe","download_url":"https://codeload.github.com/wdhowe/http-service-lein/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245593210,"owners_count":20640994,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clojure","docker","http-api","http-server","lein","leiningen","template"],"created_at":"2024-12-04T01:11:47.531Z","updated_at":"2026-05-02T15:32:09.626Z","avatar_url":"https://github.com/wdhowe.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# http-service-lein\n\n[![Build Status][gh-actions-badge]][gh-actions] [![Clojure version][clojure-v]](project.clj)\n\nHTTP service template with Leiningen.\n\n## Build and Run - lein/jar\n\nBuilding and running the http service using the lein project tools.\n\n### Build Standalone Uberjar\n\nThe standalone uberjar can be built with lein and run with the java -jar command.\n\nBuild the uberjar\n\n```bash\nlein uberjar\n```\n\n### Run With Lein or Jar\n\n* Export environment variables for server settings if wanting to override defaults.\n\n  Example\n  \n  ```bash\n  # Port the http-server will listen on (default: 8080)\n  export HTTP_PORT=8000\n  ```\n\n* Run the http-server\n  * With lein\n\n    ```bash\n    lein run\n    ```\n\n  * With the built uberjar\n\n    ```bash\n    java -jar target/uberjar/http-service-lein-1.0.0-standalone.jar\n    ```\n\n## Build and Run - docker\n\nBuilding and running the http service with docker.\n\n### Build the Docker Image\n\nThe docker image is built and tagged by running:\n\n```bash\nmake build\n```\n\n### Run Docker Container\n\nDifferent ways to run the development/testing container.\n\n* Run an interactive container.\n  * control+c to stop/remove the container.\n\n  ```bash\n  make docker-run\n  ```\n\n* Run a container and connect with a shell.\n  * Type \"exit\" to stop/remove the container.\n\n  ```bash\n  make shell\n  ```\n\n* Run a container in detached mode.\n  * Stop the container using \"docker stop `CONTAINER ID`\". It will be deleted upon stop.\n\n  ```bash\n  make docker-run-detach\n  ```\n\n## Client requests\n\nSend client requests to the running http-server.\n\n### Routes\n\nAvailable default routes are:\n\n* GET /help  -\u003e return plain text help.\n* GET /healthy  -\u003e return json of the health check response.\n\n### Examples\n\nExample output using [httpie](https://httpie.io/).\n\nhelp\n\n```bash\nhttp http://localhost:8080/help\n```\n\n```bash\nHTTP/1.1 200 OK\nContent-Type: text/plain; charset=utf-8\nDate: Fri, 26 Jan 2024 02:19:36 GMT\nServer: http-kit\ncontent-length: 140\n\nHTTP API (1.0.0). Send requests to:\nGET /help -\u003e This help dialog.\nGET /healthy -\u003e Application health check.\n```\n\nhealthy\n\n```bash\nhttp http://localhost:8080/healthy\n```\n\n```bash\nHTTP/1.1 200 OK\nContent-Type: application/json; charset=utf-8\nDate: Fri, 26 Jan 2024 02:26:14 GMT\nServer: http-kit\ncontent-length: 16\n\n{\n    \"healthy\": true\n}\n```\n\n## License\n\nCopyright © 2021-2024 Bill Howe\n\nThis program and the accompanying materials are made available under the\nterms of the Eclipse Public License 2.0 which is available at\n`http://www.eclipse.org/legal/epl-2.0.`\n\nThis Source Code may also be made available under the following Secondary\nLicenses when the conditions for such availability set forth in the Eclipse\nPublic License, v. 2.0 are satisfied: GNU General Public License as published by\nthe Free Software Foundation, either version 2 of the License, or (at your\noption) any later version, with the GNU Classpath Exception which is available\nat `https://www.gnu.org/software/classpath/license.html`.\n\n\u003c!-- Named page links below: /--\u003e\n\n[gh-actions-badge]: https://github.com/wdhowe/http-service-lein/workflows/ci%2Fcd/badge.svg\n[gh-actions]: https://github.com/wdhowe/http-service-lein/actions\n[clojure-v]: https://img.shields.io/badge/clojure-1.11.1-blue.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwdhowe%2Fhttp-service-lein","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwdhowe%2Fhttp-service-lein","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwdhowe%2Fhttp-service-lein/lists"}