Skip to content

Latest commit

 

History

History
61 lines (40 loc) · 1.12 KB

README.md

File metadata and controls

61 lines (40 loc) · 1.12 KB

The node.js example app with smaller docker footprint

This app runs on port 3001 and just displays 'Hello World ||| Hostname : Displays_Host_Name'

You can run this app with docker as well and docker compose and docker file is present.

Requirements

  • Node 16
  • Git
  • Docker

Common setup Local without Docker

Clone the repo and install the dependencies.

git clone https://github.com/absunandan008/node_docker_app.git
cd node_docker_app
npm install

Steps for read-only access

To start the express server, run the following

npm start

Open http://localhost:3001 and take a look around.

Setup with Docker

Clone the repo

git clone https://github.com/absunandan008/node_docker_app.git
cd node_docker_app
docker-compose build
docker-compose up

Open http://localhost:3001

Output:

Hello World ||| Hostname : bce9dbd2ee2a

OTHER URLs:

Gives just hostname http://localhost:3001/hostname

Gives Network details http://localhost:3001/network