cowboy_app.asciidoc 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. = cowboy(7)
  2. == Name
  3. cowboy - HTTP server for Erlang/OTP
  4. == Description
  5. Cowboy is an HTTP server for Erlang/OTP with support for the
  6. HTTP/1.1, HTTP/2 and Websocket protocols.
  7. Cowboy aims to provide a complete HTTP stack. This includes
  8. the implementation of the HTTP RFCs but also any directly
  9. related standards, like Websocket or Server-Sent Events.
  10. == Modules
  11. Functions:
  12. * link:man:cowboy(3)[cowboy(3)] - Listener management
  13. * link:man:cowboy_req(3)[cowboy_req(3)] - Request and response
  14. * link:man:cowboy_router(3)[cowboy_router(3)] - Router middleware
  15. // @todo What about cowboy_constraints?
  16. Protocols:
  17. * link:man:cowboy_http(3)[cowboy_http(3)] - HTTP/1.1 protocol
  18. * link:man:cowboy_http2(3)[cowboy_http2(3)] - HTTP/2 protocol
  19. * link:man:cowboy_websocket(3)[cowboy_websocket(3)] - Websocket protocol
  20. Behaviors:
  21. * link:man:cowboy_handler(3)[cowboy_handler(3)] - Handler middleware and behavior
  22. * link:man:cowboy_loop(3)[cowboy_loop(3)] - Loop handler behavior
  23. * link:man:cowboy_middleware(3)[cowboy_middleware(3)] - Middleware behavior
  24. * link:man:cowboy_rest(3)[cowboy_rest(3)] - REST handler behavior
  25. * link:man:cowboy_stream(3)[cowboy_stream(3)] - Stream behavior
  26. * link:man:cowboy_sub_protocol(3)[cowboy_sub_protocol(3)] - Sub protocol behavior
  27. Handlers:
  28. * link:man:cowboy_static(3)[cowboy_static(3)] - Static file handler
  29. // @todo What about cowboy_stream_h?
  30. == Dependencies
  31. * link:man:ranch(7)[ranch(7)] - Socket acceptor pool for TCP protocols
  32. * link:man:cowlib(7)[cowlib(7)] - Support library for manipulating Web protocols
  33. * ssl - Secure communication over sockets
  34. * crypto - Crypto functions
  35. // @todo Explicitly depend on ssl.
  36. All these applications must be started before the `cowboy`
  37. application. To start Cowboy and all dependencies at once:
  38. [source,erlang]
  39. ----
  40. {ok, _} = application:ensure_all_started(cowboy).
  41. ----
  42. == Environment
  43. The `cowboy` application does not define any application
  44. environment configuration parameters.
  45. == See also
  46. link:man:ranch(7)[ranch(7)],
  47. link:man:cowlib(7)[cowlib(7)]