欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2, C++/F#/Lisp
Ring
来自开放百科 - 灰狐
Ring 是 Clojure web 应用库,受 Python WSGI 和 Ruby Rack 启发。
目录 |
指南
$ lein new hello-world 和 $ cd hello-world
vim project.clj
:dependencies [[org.clojure/clojure "1.8.0"] [ring/ring-core "1.4.0"] [ring/ring-jetty-adapter "1.4.0"]])
$ lein deps 和 $ lein repl
user=> (ns hello-world.core) hello-world.core=> (defn handler [request] #_=> {:status 200 #_=> :headers {"Content-Type" "text/html"} #_=> :body "Hello World"}) hello-world.core=> (use 'ring.adapter.jetty) hello-world.core=> (use 'hello-world.core) hello-world.core=> (run-jetty handler {:port 3000}) http://localhost:3000/
Middleware
- prone Better exception reporting middleware for Ring.
- ring-middleware-format
- [optimus] A Ring middleware for frontend performance optimization.
- ring-defaults
- ring-json
图集
链接
分享您的观点