Skip to content

mag3io/sb-greetings

Repository files navigation

Build: Travis Build Status

Code Quality: bitHound Overall Score Coverage Status

Docker:

SandBox Greetings

Overview

This example uses the expressjs framework.

Running the server

From source

To run the server, follow these simple steps:

cd server/src
npm install
npm start | bunyan -o short

Alternatively you can run nodemon index.js | bunyan -o short

From container

cd server

To build the docker image run docker build -t sb-greetings . To run the container run docker run -d -p 3000:3000 --name sb-greetings sb-greetings. To remove the container docker rm -f sb-greetings

Digital Ocean

Boostrap

Further reading about Docker

Digital Ocean - Docker System Introduction

Building Docker image from the CI

Follow those tracks:

REST API:

GET http://localhost:3000/greetings/hello?name=
GET http://localhost:3000/greetings/bye?name=

Logging

Log is done with bunyan. Bunyan is "Logs for MAchines oriented, read this post for further details.

Driving ideas:

Travis integration :

Travis integration is enabled through "Repo/Settings/Webhooks & services"

On Travis side repo hook should be as well enabled.

.travis.yml contains all commands that Travis need to execute launch a build (docs on NodeJS integration)

Build details and logs can be checked on Travis website

According to default configuration every push on every branch will trigger a build (pull requests merge as well).

Repo README.md contains a link to the latest build status which si shown as an icon:

[![Build Status](https://travis-ci.org/mag3io/sb-greetings.svg?branch=master)](https://travis-ci.org/mag3io/sb-greetings)

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •