Skip to content

whitfieldc/maru_rethink_todo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MaruRethinkTodo

To-do List JSON API built with Maru framework and hamiltop's RethinkDB Elixir client

Tested against Todo-Backend spec

To Run

First, start up rethinkdb:

rethinkdb

Create a tasks table in the test database using the RethinkDB dashboard at localhost:8080

Then, in a separate terminal tab:

git clone https://github.com/whitfieldc/maru_rethink_todo.git
cd maru_rethink_todo
mix deps.get
iex -S mix

Test local version at: http://www.todobackend.com/specs/index.html?http://localhost:8880/tasks

Requirements

  • Elixir 1.2
  • Hex
  • RethinkDB

To Run via Docker

Sometimes it is cleaner to try a project without installing too many things. If you already have Docker installed, this is for you.

To build the docker image, run:

make build

It uses the official erlang image as its base and the precompiled Elixir 1.2.1. Check the Dockerfile for details.

To start the app run:

make install

It creates two containers, maru_db running RethinkDB 2.2 and maru_app runningthe Elixir service. To ease the inspection it binds ports 8080 and 8880 for the db GUI and the app API respectively.

Remember to create the table tasks under the test database as mentioned above using the RethinkDB GUI. In this case it runs on http://<docker_machine_ip>:8080 where docker_machine_ip depends on how Docker has been installed. In my case, given I use Docker Machine on MacOSX the default IP is 192.168.99.100. If you run Docker on top of Linux just use localhost.

To remove all containers run:

make clean

About

Todo List API using Elixir Maru and RethinkDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published