Just Enough Plug to Build a Web server
summary
Claims how to implement Plug by showing code that wires :gen_tcp into Plug’s API and builds a minimal server called stupefy simple web server that actually runs on port 4400. Demonstrates parsing HTTP/1.1 lines, assembling a Plug.Conn struct, passing an adapter as a tuple (module, payload), and implementing the core of Plug with only six adapter callbacks. The demo succeeds: curl gets HelloWorld back.
AI-written summary · about
chapters (25)
- 0:00Introduction
- 1:10About ZSimple
- 2:27ZSimple specification
- 2:50Interface
- 3:35Plug
- 4:26Phoenix Router
- 5:16Web Server
- 6:56HTTP
- 9:28Listen
- 12:17Waiting
- 12:48Search
- 13:40Status Line
- 15:16Connection
- 17:31FlatCon
- 22:50Build Connection
- 24:48Response Function
- 25:14Clock
- 28:23Response Phase
- 31:15Adapters
- 31:52Send response
- 32:53RequestBody
- 34:13Learning from Elixir
- 35:08Passing around modules
- 36:46API
- 37:33Demo
related talks
34mWhat you can learn from Elixirs HTTP Middleware Plug?
32mBuild your very own web framework in Elixir
39mTaming the Web with Cowboy & Coyote
34mPurify your web development with Raxx
39m"Elixir-based Ruby Web Server"
44mElmrang Connect
22mAll Aboard the Stateful Train
40mTaming the Web with Cowboy & Coyote
