{"id":13593475,"url":"https://github.com/nginx-clojure/nginx-clojure","last_synced_at":"2025-04-10T04:53:29.392Z","repository":{"id":708340,"uuid":"14975201","full_name":"nginx-clojure/nginx-clojure","owner":"nginx-clojure","description":"Nginx module for embedding Clojure or Java or Groovy programs, typically those Ring based handlers.","archived":false,"fork":false,"pushed_at":"2024-05-31T13:36:59.000Z","size":3898,"stargazers_count":1083,"open_issues_count":33,"forks_count":113,"subscribers_count":62,"default_branch":"master","last_synced_at":"2025-04-03T02:56:14.352Z","etag":null,"topics":["clojure","groovy","java","nginx","nginx-clojure","nginx-java"],"latest_commit_sha":null,"homepage":"http://nginx-clojure.github.io","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nginx-clojure.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.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,"publiccode":null,"codemeta":null}},"created_at":"2013-12-06T06:00:16.000Z","updated_at":"2025-03-13T02:53:07.000Z","dependencies_parsed_at":"2024-01-06T15:07:34.214Z","dependency_job_id":"c283d7eb-6005-4ce3-9102-94b07a85df36","html_url":"https://github.com/nginx-clojure/nginx-clojure","commit_stats":{"total_commits":567,"total_committers":12,"mean_commits":47.25,"dds":"0.43738977072310403","last_synced_commit":"df22a71f62ef831d3af9f9ac05e050363cb7337b"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nginx-clojure%2Fnginx-clojure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nginx-clojure%2Fnginx-clojure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nginx-clojure%2Fnginx-clojure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nginx-clojure%2Fnginx-clojure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nginx-clojure","download_url":"https://codeload.github.com/nginx-clojure/nginx-clojure/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161259,"owners_count":21057553,"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","groovy","java","nginx","nginx-clojure","nginx-java"],"created_at":"2024-08-01T16:01:20.686Z","updated_at":"2025-04-10T04:53:29.373Z","avatar_url":"https://github.com/nginx-clojure.png","language":"Java","readme":"[Nginx-Clojure](http://nginx-clojure.github.io)\n=============\n\n[![Build Status](https://travis-ci.com/nginx-clojure/nginx-clojure.svg?branch=master)](https://app.travis-ci.com/github/nginx-clojure/nginx-clojure)\n[![Clojars Project](https://img.shields.io/clojars/v/nginx-clojure.svg)](https://clojars.org/nginx-clojure)\n[![BSD licensed](https://img.shields.io/badge/license-BSD-blue.svg)](./LICENSE)\n![GitHub last commit](https://img.shields.io/github/last-commit/nginx-clojure/nginx-clojure)\n[![SourceForge](https://img.shields.io/sourceforge/dt/nginx-clojure)](https://sourceforge.net/projects/nginx-clojure/files/)\n\n\n![Alt text](logo.png) [Nginx-Clojure](http://nginx-clojure.github.io) is a [Nginx](http://nginx.org/) module for embedding Clojure or Java or Groovy programs, typically those [Ring](https://github.com/ring-clojure/ring/blob/master/SPEC) based handlers.\n\n\nCore Features\n=================\n\nThe latest release is v0.6.0, more detail changes about it can be found from [Release History](//nginx-clojure.github.io/downloads.html).\n\n1. Compatible with [Ring](https://github.com/ring-clojure/ring/blob/master/SPEC) and obviously supports those Ring based frameworks, such as Compojure etc.\n1. Http Services by  using Clojure / Java / Groovy to write simple handlers for http services.\n1. Nginx Access Handler by Clojure / Java / Groovy\n1. Nginx Header Filter by Clojure / Java / Groovy\n1. Nginx Body Filter by Clojure / Java / Groovy\n1. Nginx Log Handler by Clojure / Java / Groovy\n1. HTTP V2 support in both standard edition and embedded edition which are compiled against Nginx 1.18.0+\n1. Support Java 8, 9, 10, 11, 12, 19\n1. Support to use jdk19 built-in coroutine viz. Continuation\n1. Pub/Sub Among Nginx Worker Processes\n1. Shared Map based on shared memory \u0026 Shared Map based Ring session store\n1. Support Sente, see [this PR](https://github.com/ptaoussanis/sente/pull/160)\n1. Support Per-message Compression Extensions (PMCEs) for WebSocket\n1. APIs for Embedding Nginx-Clojure into a Standard Clojure/Java/Groovy App\n1. Server Side Websocket\n1. A build-in Jersey container to support java standard RESTful web services (JAX-RS 2.0)\n1. Tomcat 8 embedding support (so servlet 3.1/jsp/sendfile/JSR-356 websocket work within nginx!)\n1. Dynamic proxying by using Clojure / Java / Groovy to write a simple nginx rewrite handler to set var or return errors before proxy pass or content ring handler\n1. Non-blocking coroutine based socket which is Compatible with Java Socket API and works well with largely existing java library such as apache http client, mysql jdbc drivers. \nWith this feature  one java main thread can handle thousands of connections.\n1. Handle multiple sockets parallel in sub coroutines, e.g. we can invoke two remote services at the same time.\n1. Asynchronous callback API of socket/Channel  for some advanced usage\n1. Long Polling \u0026 Server Sent Events\n1. Run initialization clojure code when nginx worker starting\n1. Support user defined http request method\n1. Compatible with the Nginx lastest most mainline version 1.23.3. (Nginx 1.22.X, 1.20.X, 1.18.x, 1.14.x, 1.12.x, 1.8.x, 1.6.x, 1.4.x is also ok, older version is not tested and maybe works.)\n1. One of  benifits of [Nginx](http://nginx.org/) is worker processes are automatically restarted by a master process if they crash\n1. Utilize lazy headers and direct memory operation between [Nginx](http://nginx.org/) and JVM to fast handle dynamic contents from Clojure or Java code.\n1. Utilize [Nginx](http://nginx.org/) zero copy file sending mechanism to fast handle static contents controlled by Clojure or Java code.\n1. Support Linux x64, Linux x86 32bit, Win32, Win64  and Mac OS X. Freebsd version can also be got from Freebsd ports.\n\nBy the way it is very fast, the benchmarks can be found [HERE(with wrk2)](https://github.com/ptaoussanis/clojure-web-server-benchmarks/).\n\nJar Repository\n================\n\nNginx-Clojure has already been published to https://clojars.org/ whose maven repository is \n\n```xml\n\u003crepository\u003e\n  \u003cid\u003eclojars.org\u003c/id\u003e\n  \u003curl\u003ehttp://clojars.org/repo\u003c/url\u003e\n\u003c/repository\u003e\n``` \n\nAfter adding clojars repository, you can reference nginx-clojure 0.6.0 , e.g.\n\n Leiningen (clojure, no need to add clojars repository which is a default repository for Leiningen) \n-----------------\n \n```clojure\n[nginx-clojure \"0.6.0\"]\n```\nGradle (groovy/java)\n-----------------\n \n```\ncompile \"nginx-clojure:nginx-clojure:0.6.0\"\n```\nMaven\n-----------------\n \n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003enginx-clojure\u003c/groupId\u003e\n  \u003cartifactId\u003enginx-clojure\u003c/artifactId\u003e\n  \u003cversion\u003e0.6.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nDocuments\n=================\n\n\n- [Quick Start](http://nginx-clojure.github.io/quickstart.html)\n- [Downloads](http://nginx-clojure.github.io/downloads.html)\n- [Installation](http://nginx-clojure.github.io/installation.html)\n- [Configuration](http://nginx-clojure.github.io/configuration.html)\n    - [JVM Path,Class Path \u0026 Other JVM Options](http://nginx-clojure.github.io/configuration.html#user-content-21-jvm-path--class-path--other-jvm-options)\n    - [Initialization Handler for nginx worker](http://nginx-clojure.github.io/configuration.html#user-content-22-initialization-handler-for-nginx-worker)\n    - [Content Ring Handler for Location](http://nginx-clojure.github.io/configuration.html#user-content-23-content-ring-handler-for-location)\n    - [Coroutine/Asynchronous Client Channel/Thread Pool](http://nginx-clojure.github.io/configuration.html#user-content-24-chose--coroutine-based-socket-or-asynchronous-socketchannel-or-thread-pool-for-slow-io-operations)\n- [Nginx Handlers](http://nginx-clojure.github.io/configuration.html#user-content-25-nginx-rewrite-handler)\n    - [Nginx Rewrite Handler](http://nginx-clojure.github.io/configuration.html#user-content-25-nginx-rewrite-handler)\n    - [Nginx Access Handler](http://nginx-clojure.github.io/configuration.html#user-content-26-nginx-access-handler)\n    - [Nginx Header Filter](http://nginx-clojure.github.io/configuration.html#user-content-27-nginx-header-filter)\n    - [Nginx Body Filter](http://nginx-clojure.github.io/configuration.html#user-content-28-nginx-body-filter)\n    - [Nginx Log Handler](http://nginx-clojure.github.io/configuration.html#user-content-29-nginx-log-handler)\n- Advanced Topic\n    - [Embedding Nginx-Clojure into a standard App](http://nginx-clojure.github.io/embed.html)\n    - [Server Channel for Long Polling \u0026 Server Sent Events](http://nginx-clojure.github.io/more.html#user-content-34-server-channel-for-long-polling--server-sent-events-sse)\n    - [Pub/Sub Among Nginx Worker Processes](http://nginx-clojure.github.io/subpub.html)\n    - [Shared Map \u0026 Session Store](http://nginx-clojure.github.io/sharedmap.html)\n    - [Asynchronous Client Channel](http://nginx-clojure.github.io/more.html#user-content-36-asynchronous-client-channel)\n    - [About Logging](http://nginx-clojure.github.io/more.html#user-content-37--about-logging)\n    - [Sever Side WebSocket](http://nginx-clojure.github.io/more.html#user-content-38--sever-side-websocket)\n    - [Java standard RESTful web services with Jersey](http://nginx-clojure.github.io/more.html#user-content-39--java-standard-restful-web-services-with-jersey)\n    - [Embedding Tomcat](http://nginx-clojure.github.io/more.html#user-content-310-embeding-tomcat)\n    - [Use Spring Framework with Nginx-Clojure Java Handlers](https://github.com/nginx-clojure/nginx-clojure/tree/master/example-projects/spring-core-example)\n    - [Example Project about Jersey \u0026 Spring with Nginx-Clojure](https://github.com/nginx-clojure/nginx-clojure/tree/master/example-projects/jersey-spring-example)\n    - [More about Nginx Worker Process](http://nginx-clojure.github.io/more.html#user-content-311-more-about-nginx-worker-process)\n    - [More about Nginx-Clojure](http://nginx-clojure.github.io/more.html)\n- [Directives Reference](http://nginx-clojure.github.io/directives.html)\n- [API Reference (Clojure)](http://nginx-clojure.github.io/api/)\n- [Example Projects](https://github.com/nginx-clojure/nginx-clojure/tree/master/example-projects)\n- [Github Repository of Documents](https://github.com/nginx-clojure/nginx-clojure.github.io)\n\n\nLicense\n=================\nCopyright © 2013-2023 Zhang, Yuexiang (xfeep) and released under the BSD 3-Clause license.\n\nThis program uses:\n* Re-rooted ASM bytecode engineering library which is distributed under the BSD 3-Clause license\n* Modified Continuations Library written by Matthias Mann  is distributed under the BSD 3-Clause license\n","funding_links":[],"categories":["Java","Third Party Modules","Third Modules","III. Network and Integration","网络编程"],"sub_categories":["C Modules","1. Servers (Web Server and Application Server)"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnginx-clojure%2Fnginx-clojure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnginx-clojure%2Fnginx-clojure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnginx-clojure%2Fnginx-clojure/lists"}