Skip to content

Backend component of the demonstration Todo app for The Lightweight Docker Runtime

Notifications You must be signed in to change notification settings

Accenture/tldr-todo-backend

Repository files navigation

A Hapi To Do Backend

This is an example implementation of a Todo-Backend API spec using the Hapi.js framework.

This example saves todos in a MongoDB collection.

Run the specs! Demo!

Pre-requisites

The following are necessary to run the application:

  • Docker Toolbox 1.9, with Docker-machine and Docker-compose
  • Node.js (4.x or 5.x recommended)

Building the container

In order to build the container, first install the needed NPM dependencies for the Node.js backend:

npm install

Then, create a Docker node with docker-machine:

docker-machine create -d virtualbox dev
eval $(docker-machine env dev)

Finally, build the container:

docker build -t backend .

Running with MongoDB

There's a ready-made Compose file available that will run the application together with Mongo:

docker-compose up

Accessing the application

Run the following command to obtain the IP address of the docker-machine host:

docker-machine ip dev

Then, point the application to port 8080 of the given IP address.

About

Backend component of the demonstration Todo app for The Lightweight Docker Runtime

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published