cowboy_app.asciidoc 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. = cowboy(7)
  2. == Name
  3. cowboy - Small, fast, modern 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
  15. * link:man:cowboy_constraints(3)[cowboy_constraints(3)] - Constraints
  16. Protocols:
  17. * link:man:cowboy_http(3)[cowboy_http(3)] - HTTP/1.1
  18. * link:man:cowboy_http2(3)[cowboy_http2(3)] - HTTP/2
  19. * link:man:cowboy_websocket(3)[cowboy_websocket(3)] - Websocket
  20. Handlers:
  21. * link:man:cowboy_static(3)[cowboy_static(3)] - Static file handler
  22. Stream handlers:
  23. * link:man:cowboy_stream_h(3)[cowboy_stream_h(3)] - Default stream handler
  24. * link:man:cowboy_compress_h(3)[cowboy_compress_h(3)] - Compress stream handler
  25. * link:man:cowboy_metrics_h(3)[cowboy_metrics_h(3)] - Metrics stream handler
  26. * link:man:cowboy_tracer_h(3)[cowboy_tracer_h(3)] - Tracer stream handler
  27. Behaviors:
  28. * link:man:cowboy_handler(3)[cowboy_handler(3)] - Plain HTTP handlers
  29. * link:man:cowboy_loop(3)[cowboy_loop(3)] - Loop handlers
  30. * link:man:cowboy_middleware(3)[cowboy_middleware(3)] - Middlewares
  31. * link:man:cowboy_rest(3)[cowboy_rest(3)] - REST handlers
  32. * link:man:cowboy_stream(3)[cowboy_stream(3)] - Stream handlers
  33. * link:man:cowboy_websocket(3)[cowboy_websocket(3)] - Websocket handlers
  34. Middlewares:
  35. * link:man:cowboy_router(3)[cowboy_router(3)] - Router middleware
  36. * link:man:cowboy_handler(3)[cowboy_handler(3)] - Handler middleware
  37. // @todo http_status_codes is not linked to; what to do with it?
  38. == Dependencies
  39. * link:man:ranch(7)[ranch(7)] - Socket acceptor pool for TCP protocols
  40. * link:man:cowlib(7)[cowlib(7)] - Support library for manipulating Web protocols
  41. * ssl - Secure communication over sockets
  42. * crypto - Crypto functions
  43. All these applications must be started before the `cowboy`
  44. application. To start Cowboy and all dependencies at once:
  45. [source,erlang]
  46. ----
  47. {ok, _} = application:ensure_all_started(cowboy).
  48. ----
  49. == Environment
  50. The `cowboy` application does not define any application
  51. environment configuration parameters.
  52. == See also
  53. link:man:ranch(7)[ranch(7)],
  54. link:man:cowlib(7)[cowlib(7)]