{ok, _} = application:ensure_all_started(cowboy).
From 83f1ad46e84c1a9016c9dee2c1ec749880dfd260 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= cowboy - Small, fast, modular HTTP server. cowboy - Small, fast, modern HTTP server for Erlang/OTP Cowboy is an HTTP server for Erlang/OTP with support for the
+HTTP/1.1, HTTP/2 and Websocket protocols. Cowboy aims to provide a complete HTTP stack. This includes
+the implementation of the HTTP RFCs but also any directly
+related standards, like Websocket or Server-Sent Events. Functions:
+cowboy(3) - Listener management
+
+cowboy_req(3) - Request and response
+
+cowboy_router(3) - Router
+ 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_sub_protocol(3) - Sub protocols
+
+cowboy_websocket(3) - Websocket handlers
+ Middlewares:
+cowboy_router(3) - Router middleware
+
+cowboy_handler(3) - Handler middleware
+ The The All these applications must be started before the Name
Description
+Modules
+
+
+
+
+
+
Dependencies
cowboy
application uses the Erlang applications ranch
-for listening and accepting TCP connections, crypto
for
-establishing Websocket connections, and cowlib
for parsing and
-building messages for Web protocols. These dependencies must
-be loaded for the cowboy
application to work. In an embedded
-environment this means that they need to be started with the
-application:start/{1,2}
function before the cowboy
-application is started.cowboy
application also uses the Erlang applications
-asn1
, public_key
and ssl
when listening for HTTPS connections.
-These are started automatically if they weren’t before.cowboy
+application. To start Cowboy and all dependencies at once:{ok, _} = application:ensure_all_started(cowboy).