{"id":26178464,"url":"https://github.com/minosniu/vertx-lang-clojure","last_synced_at":"2025-04-14T22:06:53.531Z","repository":{"id":40449489,"uuid":"116576189","full_name":"minosniu/vertx-lang-clojure","owner":"minosniu","description":"Vert.x Clojure support","archived":false,"fork":false,"pushed_at":"2025-03-12T03:35:59.000Z","size":524,"stargazers_count":63,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-14T22:06:34.872Z","etag":null,"topics":["clj","clojure","clojure-support","verticle","vertx"],"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/minosniu.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-07T15:23:18.000Z","updated_at":"2025-03-26T20:50:39.000Z","dependencies_parsed_at":"2024-09-16T12:36:38.604Z","dependency_job_id":"12f31290-b983-4c15-9e12-712058332519","html_url":"https://github.com/minosniu/vertx-lang-clojure","commit_stats":null,"previous_names":["whitewoodcity/vertx-lang-clojure","minosniu/vertx-lang-clojure","vertx-china/vertx-lang-clojure"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minosniu%2Fvertx-lang-clojure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minosniu%2Fvertx-lang-clojure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minosniu%2Fvertx-lang-clojure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minosniu%2Fvertx-lang-clojure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/minosniu","download_url":"https://codeload.github.com/minosniu/vertx-lang-clojure/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248968835,"owners_count":21191160,"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":["clj","clojure","clojure-support","verticle","vertx"],"created_at":"2025-03-11T21:28:42.474Z","updated_at":"2025-04-14T22:06:53.503Z","avatar_url":"https://github.com/minosniu.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vertx-lang-clojure\nVert.x Clojure support.\n\nThis version has not been submitted to Maven Central, so you need to `mvn install` to use.\nSee https://github.com/tychobrailleur/vertx-lang-clojure-example for examples of usage.\n\nKnown problem: vertx-lang-clojure has a conflict with datomic in netty-transport-native\n\n### How to use?\n\nIn vertx-lang-clojure-gen/, run `mvn install` first.\n\nGo back to vertx-lang-clojure/, run `mvn install` subsequently.\n\nMaven (in your pom.xml):\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.sparcing\u003c/groupId\u003e\n  \u003cartifactId\u003evertx-lang-clojure\u003c/artifactId\u003e\n  \u003cversion\u003e4.5.13\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nLeiningen (in your `project.clj`):\n\n```clojure\n  :dependencies [[org.clojure/clojure \"1.11.4\"]\n                 [io.vertx/vertx-web \"4.5.13\"]\n                 [com.sparcing/vertx-lang-clojure \"4.5.13\"]]\n```\n\n\n### Hello from Vert.x!\n\n```clojure\n(ns example.server\n (:require [io.vertx.clojure.core.vertx :as vertx]\n           [io.vertx.clojure.core.http.http-server :as server]\n           [io.vertx.clojure.core.http.http-server-request :as request]\n           [io.vertx.clojure.core.http.http-server-response :as response]))\n\n(defn handle-request [req]\n  (let [response (request/response req)]\n    (-\u003e response\n        (response/put-header \"content-type\" \"text/plain\")\n        (response/end \"Hello from Vert.x!\"))))\n\n(defn start [vertx]\n  (let [http-server (vertx/create-http-server vertx)]\n    (-\u003e http-server\n        (server/request-handler (vertx/handler handle-request))\n        (server/listen 8080))))\n```\n\n### Vert.x instance\n\nIf you’re embedding Vert.x then you simply create an instance as follows:\n\n```clojure\n(ns ...\n  (:require [io.vertx.clojure.core.vertx :as vertx]))\n\n;create a vertx instance\n(vertx/vertx)\n```\n\n### Verticle\n\nVerticle namespace files normally include a start function which is the entry point of verticle deployment.\n\nHere’s an example verticle:\n```clojure\n\n;Called when verticle is deployed\n(defn start [])\n\n;Optional - called when verticle is undeployed\n(defn stop [])\n```\n\nWhen Vert.x deploys the verticle it will call the start method, and when the method has completed the verticle will be considered started.\n\nYou can also optionally provide vertx and context parameters. This will be used by developers when the functions are considered pure.\n\n```clojure\n\n;Following functions format are all allowed, pick one.\n(defn start [context vertx])\n(defn start [vertx context])\n(defn start [vertx])\n(defn start [context])\n\n;Following functions format are all allowed, pick one.\n(defn stop [context vertx])\n(defn stop [vertx context])\n(defn stop [vertx])\n(defn stop [context])\n\n```\n\n### Verticle Deployment\n\nA Clojure verticle can be deployed with `.clj` suffix or `clj:` prefix:\n\n```clojure\n(ns example.verticle\n  (:require [io.vertx.clojure.core.vertx :as vertx]))\n\n; completion-handler is required to start the verticle\n(def my-handler\n  (verticle/completion-handler #(println %)))\n\n(defn start [vertx]\n  (vertx/deploy-verticle vertx \"io.vertx.sample_verticle.clj\" my-handler))\n;or\n(defn start [vertx]\n  (vertx/deploy-verticle vertx \"clj:io.vertx.sample_verticle\" my-handler))\n```\n\n;TODO\n\n- [x] Auto-generate thin wrap APIs by using Codegen\n- [x] VerticleWrapper of generated APIs(ClojureVerticle for .clj suffix namespaces)\n- [x] ClojureVerticleFactory service\n- [x] Tests\n- [ ] Auto-generate docs by using Docgen\n- [ ] Using Codox to generate on-line Clojure documentation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminosniu%2Fvertx-lang-clojure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminosniu%2Fvertx-lang-clojure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminosniu%2Fvertx-lang-clojure/lists"}