https://github.com/bsctl/nodejs-web-app
A simple demo web server written in nodejs.
https://github.com/bsctl/nodejs-web-app
docker nodejs openshift tutorial
Last synced: 7 months ago
JSON representation
A simple demo web server written in nodejs.
- Host: GitHub
- URL: https://github.com/bsctl/nodejs-web-app
- Owner: bsctl
- License: mit
- Created: 2017-02-06T08:46:41.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2020-01-23T23:10:19.000Z (about 6 years ago)
- Last Synced: 2025-04-12T03:14:43.794Z (10 months ago)
- Topics: docker, nodejs, openshift, tutorial
- Language: JavaScript
- Homepage:
- Size: 30.3 KB
- Stars: 1
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A simple web server
A simple web server in nodejs. It is intended for demo only, no production. A Dockerfile is provided in the reposistory to build a docker image and run the application as linux container.
On CentOS linux, install and start Docker
[root@centos ~]# yum install -y docker
[root@centos ~]# systemctl start docker
Install git and clone the reposistory
[root@centos]# yum install -y git
[root@centos]# git clone https://github.com/bsctl/nodejs-web-app
[root@centos]# cd nodejs-web-app
Build a Docker image
[root@centos nodejs-web-app]# docker build -t nodejs-web-app .
[root@centos nodejs-web-app]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nodejs-web-app latest e6e0578f5f2d 2 minutes ago 659.6 MB
Start the container by setting the desired answer message in the MESSAGE env variable
[root@centos]# docker run --name=web -p 80:8080 -d -e MESSAGE="Thanks for all the fish ..." nodejs-web-app
[root@centos]# curl localhost:80
Thanks for all the fish ...