Skip to content

About

Simplistic example code for an HTTP server in Elixir

Resources

Stars

3 stars

Watchers

2 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Simple Server

This repo contains some very basic code to set up an HTTP server written in Elixir.

If you don't already have Elixir installed, please see the Elixir website for installation instructions...

Installation

  • Clone the repo
git clone https://github.com/wesdunn/simpleserver-elixir.git && cd $_
  • Download and install dependencies
mix deps.get
  • Start the server...
iex -S mix
  • Send some requests to the server (use another terminal window for this...) Simple GET request
curl -v "http://localhost:8085/hello"

Simple POST request

curl -v -H 'Content-Type: application/json' "http://localhost:8085/post" -d '{"message": "hello world" }'

Ensure non-existant routes are handled properly

curl -v "http://localhost:8085/thisshouldbea404"

About

Simplistic example code for an HTTP server in Elixir

Resources

Stars

3 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages