{"id":13771506,"url":"https://github.com/aburd/gemini-server-clj","last_synced_at":"2025-07-27T04:43:54.799Z","repository":{"id":219401901,"uuid":"748738486","full_name":"aburd/gemini-server-clj","owner":"aburd","description":"A gemini server written in Clojure (WIP)","archived":false,"fork":false,"pushed_at":"2024-02-12T13:27:15.000Z","size":1024,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-31T05:16:40.549Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aburd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2024-01-26T16:54:21.000Z","updated_at":"2024-02-17T04:16:35.000Z","dependencies_parsed_at":"2024-01-27T08:21:06.414Z","dependency_job_id":"0c3940cc-1c4d-4ef2-94e1-975c7cb7166c","html_url":"https://github.com/aburd/gemini-server-clj","commit_stats":null,"previous_names":["aburd/gemini-server-clj"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aburd%2Fgemini-server-clj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aburd%2Fgemini-server-clj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aburd%2Fgemini-server-clj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aburd%2Fgemini-server-clj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aburd","download_url":"https://codeload.github.com/aburd/gemini-server-clj/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239859566,"owners_count":19708861,"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":[],"created_at":"2024-08-03T17:00:52.189Z","updated_at":"2025-02-20T14:52:44.300Z","avatar_url":"https://github.com/aburd.png","language":"Clojure","funding_links":[],"categories":["Servers"],"sub_categories":["Graphical"],"readme":"# Gemini Server CLJ [gs-clj]\n\nA gemini server written in Clojure built mostly on top of the wonderful [aleph](https://github.com/clj-commons/aleph) library.\n\n## Usage\n\n### As a stand-alone Gemini Server\n\nFor now, all it does is map the requests to the public path (default: `resources/public`). Only handles gmi, txt, jpg, and png file types.\n\nYou can use this project as a server through the CLI. \nAfter cloning this repo, you'll need [leiningen](https://leiningen.org) to install the depedencies and run the server. After running `lein install`, use `lein run` for more information.\n\n```\n➜  gemini-server-clj git:(main) ✗ lein run\nGemini server\n\nUsage: gemini-server-clj [options] ACTION\n\nOptions:\n  -p, --port PORT                              Port number\n  -v, --verbose                                Verbose logging\n  -l, --log-level LEVEL                        Level of log 0-6, 0 is trace\n  -c, --config CONFIG    resources/config.edn  path to config.edn\n  -u, --public PUBLIC_PATH                        path to your public files\n  -h, --help\n\nActions:\n  start    Start a new server\n```\n\n#### Configuration File\n\nYou can set a configuration file at resources/config.edn. If you want to put your config file somewhere else, then tell the cli: `--config other_path/config.edn`. You can find a config in the resources/config.edn folder.\n\nCLI opts will override config file if you pass them in.\n\n### As a library\n\n```clojure\n(require '[gs-clj.server :as server])\n\n(defn handler [req opts]\n  {:header {:status :success    ; or just use :code\n            :code 20            ; or just use :header\n            :meta \"text/gemini\"\n   :body {:utf8 \"hello gemini!\"})\n\n(defn img-handler [req opts]\n  {:header {:status :success    ; or just use :code\n            :code 20            ; or just use :header\n            :meta \"image/png\"\n   :body {:bytes (utils/slurp-bytes \"some-pic.png\")})\n\n; TODO: how to config ssl-certs\n(server/start! handler {:port 1965})\n```\n\n`req` has various uri information, basically what you'd find in a [lambdaisland/uri](https://cljdoc.org/d/lambdaisland/uri/1.19.155/api/lambdaisland.uri) response, sans the things not in the gemini spec. \n\n`opts` contains public-path info.\n\n## License\n\nCopyright © 2024 Aaron Burdick\n\nThis program and the accompanying materials are made available under the\nterms of the [GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faburd%2Fgemini-server-clj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faburd%2Fgemini-server-clj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faburd%2Fgemini-server-clj/lists"}