Cowboy 2.0.0 发布,Cowboy 是一个小巧快速的良好模块化的 HTTP Server 。其中良好的 clean module 使得我们可以扩展到多种网络协议之中,cowboy 自带的有 tcp 和 ssl ,而也有一些人提供了 smtp 等的扩展。 Cowboy是 Erlang / OTP 的 HTTP 服务器,支持 HTTP / 1.1、HTTP / 2 和 Websocket 协议。 Cowboy 2.0 用户手册 Cowboy 2.0 特性参考 Modules Functions: cowboy(3) - Listener management cowboy_req(3) - Request and response cowboy_router(3) - Router cowboy_constraints(3) - Constraints Protocols: cowboy_http(3) - HTTP/1.1 cowboy_http2(3) - HTTP/2 cowboy_websocket(3) - Websocket Handlers: cowboy_static(3) - Static file handler Behaviors: cowboy_handler(3) - Plain HTTP handlers cowboy_loop(3) - Loop handlers cowboy_middleware(3) - Middlewares cowboy_rest(3) - REST handlers cowboy_stream(3) - Stream handlers cowboy_websocket(3) - Websocket handlers Middlewares: cowboy_router(3) - Router middleware cowboy_handler(3) - Handler middleware Dependencies ranch(7) - Socket acceptor pool for TCP protocols cowlib(7) - Support library for manipulating Web protocols ssl - Secure communication over sockets crypto - Crypto functions All these applications must be started before the cowboy application. To start Cowboy and all dependencies at once: {ok, _} = application:ensure_all_started(cowboy). Environment The cowboy application does not define any application environment configuration parameters. 下载地址: Source code (zip) Source code (tar.gz) Cowboy 2.0.0 发布,模块化的 HTTP 服务器下载地址