aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/manual/cowboy_app.asciidoc
blob: 933834f42a027c8b96109018b22744ec879e46ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
= cowboy(7)

== Name

cowboy - HTTP server for Erlang/OTP

== Description

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.

== Modules

Functions:

* link:man:cowboy(3)[cowboy(3)] - Listener management
* link:man:cowboy_req(3)[cowboy_req(3)] - Request and response
* link:man:cowboy_router(3)[cowboy_router(3)] - Router middleware

// @todo What about cowboy_constraints?

Protocols:

* link:man:cowboy_http(3)[cowboy_http(3)] - HTTP/1.1 protocol
* link:man:cowboy_http2(3)[cowboy_http2(3)] - HTTP/2 protocol
* link:man:cowboy_websocket(3)[cowboy_websocket(3)] - Websocket protocol

Behaviors:

* link:man:cowboy_handler(3)[cowboy_handler(3)] - Handler middleware and behavior
* link:man:cowboy_loop(3)[cowboy_loop(3)] - Loop handler behavior
* link:man:cowboy_middleware(3)[cowboy_middleware(3)] - Middleware behavior
* link:man:cowboy_rest(3)[cowboy_rest(3)] - REST handler behavior
* link:man:cowboy_stream(3)[cowboy_stream(3)] - Stream behavior
* link:man:cowboy_sub_protocol(3)[cowboy_sub_protocol(3)] - Sub protocol behavior

Handlers:

* link:man:cowboy_static(3)[cowboy_static(3)] - Static file handler

// @todo What about cowboy_stream_h?

== Dependencies

* link:man:ranch(7)[ranch(7)] - Socket acceptor pool for TCP protocols
* link:man:cowlib(7)[cowlib(7)] - Support library for manipulating Web protocols
* ssl - Secure communication over sockets
* crypto - Crypto functions

// @todo Explicitly depend on ssl.

All these applications must be started before the `cowboy`
application. To start Cowboy and all dependencies at once:

[source,erlang]
----
{ok, _} = application:ensure_all_started(cowboy).
----

== Environment

The `cowboy` application does not define any application
environment configuration parameters.

== See also

link:man:ranch(7)[ranch(7)],
link:man:cowlib(7)[cowlib(7)]