Skip to content

Commit

Permalink
Added sampleapp source code (#1)
Browse files Browse the repository at this point in the history
* Create app.js

* Create Containerfile

* Create README.md

* Update README.md

* Rename Containerfile to Containerfile

* Rename README.md to README.md

* Rename app.js to app.js

* Update README.md

* Update Makefile

* Update Containerfile
  • Loading branch information
mukrishn authored Jun 20, 2024
1 parent 49969a9 commit 45e2493
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ENGINE ?= podman
ORG ?= cloud-bulldozer
REGISTRY ?= quay.io
REG = $(REGISTRY)/$(ORG)
REPOS = perfapp etcd-perf nginx frr netpol-scraper nginxecho eipvalidator
REPOS = perfapp etcd-perf nginx frr netpol-scraper nginxecho eipvalidator sampleapp

all: build push

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Container Images for OCP Perf&Scale
- nginx: quay.io/cloud-bulldozer/nginx:latest
- etcd-perf: quay.io/cloud-bulldozer/etcd-perf:latest
- perfApp: quay.io/cloud-bulldozer/perfapp:latest
- sampleapp: quay.io/cloud-bulldozer/sampleapp:latest
- frr: quay.io/cloud-bulldozer/frr:latest
- netpol-scraper: quay.io/cloud-bulldozer/netpol-scraper:latest
- eipvalidator: quay.io/cloud-bulldozer/eipvalidator:latest
Expand Down
3 changes: 3 additions & 0 deletions sampleapp/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM node:22
ADD app.js /app.js
ENTRYPOINT ["node", "app.js"]
8 changes: 8 additions & 0 deletions sampleapp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Node JS app for a webserver pod

## Image Repository
* quay.io/cloud-bulldozer/sampleapp:latest

## Application
* Listens on port 8080
* Returns 200 for GETs
11 changes: 11 additions & 0 deletions sampleapp/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const http = require('http');
const os = require('os');


var handler = function(request, response) {
console.log("Received request from " + request.connection.remoteAddress);
response.writeHead(200);
};

var www = http.createServer(handler);
www.listen(8080);

0 comments on commit 45e2493

Please sign in to comment.