Thanks to visit codestin.com
Credit goes to github.com

Skip to content

PhilipStevenson/hello-world-api-docker

Repository files navigation

Hello World API Docker 🐳

An API that returns the following JSON when the / endpoint is called

{"message":"Hello World!"}

Whale Hello There

Prerequisites

  • Docker installed
  • NPM installed

Environment variables

The following environment variables need to be set before the application can be run

export HELLO_WORLD_API_PORT=3000

Running the application

Using NPM

Install dependencies

npm install

Start the server

npm start

Go to the following URL localhost:<HELLO_WORLD_API_PORT> e.g. localhost:3000

Docker 🐳

Build the image and run the container using Docker compose

npm run docker

Go to the following URL localhost:<HELLO_WORLD_API_PORT> e.g. localhost:3000

Running the unit tests

npm test

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors