This is a simple web application implemented in ExpressJS that displays the hostname of the server and the current time.
Build the Docker image using the following command:
docker build -t cac-simple-webapp .
Once the image is built, you can run a container using the following command:
docker run -p 3000:3000 -e PORT=3000 cac-simple-webapp
The server running the application should have NodeJS (8.x) installed. Read here how to install NodeJS on Ubuntu.
Clone this repository to the server:
$ git clone https://github.com/TimothySealy/cac-simple-webapp.git
$ cd cac-simple-webapp
Install dependencies (once) and then run the application:
$ npm install
$ npm run start
The web application runs on port 3000 by default. The port can be changed using the PORT environment variable. For example:
$ export PORT=80