Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
88 lines (50 sloc) 1.89 KB


A simple dynamo application.

It is an example of simple Dynamo application, which:

  • handles GET requests
  • uses callbacks
  • sets custom headers
  • uses parametrized routes
  • sets custom status code
  • sends files
  • generates JSON using exjson
  • serves content from the "public" directory at /public

Live app

This example app is also deployed to Heroku.

How to run it locally

  1. Get Elixir. Beware that Dynamo depends on currently unstable Elixir If you're on Mac and are using Homebrew to manage packages, install the most recent Elixir with:

    $ brew install erlang && brew install --HEAD

  2. Clone this repo:

    $ git clone && cd dynamo_demo

  3. Run server:

    $ elixir --no-halt -S mix run "DynamoDemo.start"

  4. That's it. The app is now running at localhost:3000.

How to run it on Heroku

  1. Create new Heroku Elixir app:

    $ heroku create --buildpack ""

  2. Push it:

    $ git push heroku master

    It will take some time to deploy, normally 1-2 minutes.

  3. Access it:

    $ heroku open


The app implements very simple API


Responds with blank JSON object.

GET /version

Responds with JSON object containing version key with value of DynamoDemo.version.

GET /readme

Responds with plain text contents of this file.

GET /hello

Responds with JSON greeting the world.

GET /hello/:name

Responds with JSON greeting name.

GET /restricted

Responds with status code 451 Unavailable For Legal Reasons.


Released under the MIT license.

Something went wrong with that request. Please try again.