Cowboy Examples Save Abandoned

This project will clone all the misultin examples over to cowboy ones

Project README

Quickstart

  • If you already have make, rebar and git in your path (even on windows)
    • make && ./startit
    • run whatever app you want by starting it -> helloworld:start()
    • check it out at http://localhost:8080
  • NOTE: Apps all run on :8080 (so must be run one by one)

What is this?

This is a simple project to show some examples of using the Erlang Cowboy "Small, fast, modular HTTP server and socket acceptor pool". The first order of business was to port all the amazing misultin examples over to cowboy. Part of my motivation for doing this was the misultin end of life.

What isn't this?

This isn't documentation, or intended as any sort of documentation replacement this is just a small set of working example you can run locally and quickly.

Too complicated?

I did my best to keep it simple while following the OTP structure. If you are un-familiar with OTP some of the examples might seem overly wordy. I am not going to worry too much about that and just label it "bonus learning"!

Each application was designed as an island able to be run completely seperate from the other applications (but obviously still has dependancies on cowboy).

Examples List

  • echo_get -> Dealing with querystring data
  • echo_post -> Dealing with posted data
  • hello_world -> Start here!
  • hello_world_chunked -> Shows serving a reply in chunks
  • hello_world_rest -> Show the RESTful upgrade / handler in Cowboy
  • hello_world_ssl -> Show the simpliest SSL app
  • redirect -> Show a basic redirect using a header
  • static -> Show the static handler in Cowboy

Links

TODO

  • Access Log -> Hard to do right now due to lack of a good place to hook
  • Comet
  • Compression -> Coming soon, but will be hand coded
  • Cookies
  • EventSource
  • File (binary save)
  • Multiple Servers (concurrently)
  • Sessions
  • Stream
  • Websocket
Open Source Agenda is not affiliated with "Cowboy Examples" Project. README Source: robertmeta/cowboy-examples
Stars
46
Open Issues
2
Last Commit
5 years ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating