{"id":34546341,"url":"https://github.com/tailrecursion/clojure-var-daemon","last_synced_at":"2026-05-27T01:02:34.535Z","repository":{"id":14688579,"uuid":"17408277","full_name":"tailrecursion/clojure-var-daemon","owner":"tailrecursion","description":"Slightly easier Clojure daemons with Apache Commons Daemon","archived":false,"fork":false,"pushed_at":"2014-03-04T16:23:42.000Z","size":116,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-12-25T18:44:26.583Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tailrecursion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-04T16:16:57.000Z","updated_at":"2025-09-22T02:10:50.000Z","dependencies_parsed_at":"2022-09-23T22:20:34.263Z","dependency_job_id":null,"html_url":"https://github.com/tailrecursion/clojure-var-daemon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tailrecursion/clojure-var-daemon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailrecursion%2Fclojure-var-daemon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailrecursion%2Fclojure-var-daemon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailrecursion%2Fclojure-var-daemon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailrecursion%2Fclojure-var-daemon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tailrecursion","download_url":"https://codeload.github.com/tailrecursion/clojure-var-daemon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailrecursion%2Fclojure-var-daemon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33545459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"ssl_error","status_checked_at":"2026-05-26T15:22:15.568Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2025-12-24T07:05:19.550Z","updated_at":"2026-05-27T01:02:34.329Z","avatar_url":"https://github.com/tailrecursion.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clojure-var-daemon\n\n`clojure-var-daemon` is a thin Java layer between your Clojure program and [Apache Commons Daemon](http://commons.apache.org/proper/commons-daemon/) that saves you from necessarily AOT-ing Clojure code.\n\nFor details on Clojure daemons, check out the excellent [Clojure Cookbook: Daemonizing an Application](http://www.rkn.io/2014/02/06/clojure-cookbook-daemons/) blog post by [Ryan Neufeld](https://github.com/rkneufeld).\n\nThe approach was inspired by [Pedestal's ClojureVarServlet](https://github.com/pedestal/pedestal/blob/master/service/java/io/pedestal/servlet/ClojureVarServlet.java).\n\n### Dependency\n\nFrom Clojars:\n\n    [tailrecursion/clojure-var-daemon \"1.0.0\"]\n\n### Usage\n\nFirst, create a namespace with `init`, `start`, `stop`, and `destroy` definitions:\n\n```clojure\n(ns my.daemon\n  (:import (org.apache.commons.daemon\n             DaemonContext             ;; Passed to init\n             DaemonInitException)))    ;; Throw in init if you fail to initialize\n\n(defn init [^DaemonContext ctx] ,,,)\n(defn start [] ,,,)\n(defn stop [] ,,,)\n(defn destroy [] ,,,)\n```\n\nThen, create an uberjar of your project with `lein uberjar`.\n\nFinally, run your program as a daemon with `jsvc`.  Specify the lifecycle namespace via `-Ddaemon.clojure.ns=my.daemon` and use `tailrecursion.ClojureVarDaemon` as the classfile argument:\n\n```\njsvc                                                  \\\n  -java-home \"$JAVA_HOME\"                             \\\n  -cp target/my-project-0.1.0-SNAPSHOT-standalone.jar \\\n  -outfile \"${PWD}/out.txt\"                           \\\n  -pidfile \"${PWD}/pid.txt\"                           \\\n  -Ddaemon.clojure.ns=my.daemon                       \\\n  tailrecursion.ClojureVarDaemon\n```\n\n## License\n\n    Copyright (c) Alan Dipert and Micha Niskin. All rights\n    reserved. The use and distribution terms for this software are\n    covered by the Eclipse Public License 1.0\n    (http://opensource.org/licenses/eclipse-1.0.php) which can be\n    found in the file epl-v10.html at the root of this\n    distribution. By using this software in any fashion, you are\n    agreeing to be bound by the terms of this license. You must not\n    remove this notice, or any other, from this software.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftailrecursion%2Fclojure-var-daemon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftailrecursion%2Fclojure-var-daemon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftailrecursion%2Fclojure-var-daemon/lists"}