Thanks to visit codestin.com
Credit goes to github.com

Skip to content

joaquinipar/servy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Servy

image

Servy is a humble HTTP Server written in Elixir for the Pragmatic Studio's Elixir & OTP course.

Servy features

  • Heavy use of pattern matching
  • File and Socket IO
  • Handling state with GenServer
  • Using Supervisor to immediately recover from failures 🙌
  • Handling requests in concurrent processes

Relevant project files

A good entry point of the project would be checking the Handler module, that acts as a router for the requests. The server replies with JSON objects or HTML, depending on the endpoint that's matched on the router. Some routes to try:

  • /pledges
  • /sensors
  • /404s holds the routes requested by the user but weren't found
  • and more..

GenServer Modules

Supervisor supervises:

ServicesSupervisor supervises:

Installation

If available in Hex, the package can be installed by adding servy to your list of dependencies in mix.exs:

def deps do
  [{:servy, "~> 0.1.0"}]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/servy.

Running this project

> mix run --no-halt

or

> iex.bat -S mix

About

HTTP server written in Elixir following the Pragmatic Studio Elixir & OTP course

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published