Browse Source

add nginx example

master
Nicolas Massé 7 years ago
parent
commit
8c5f0a95d1
  1. 5
      Nginx-S2I-Image/README.md
  2. 17
      Nginx-S2I-Image/index.html
  3. 3
      Nginx-S2I-Image/nginx.conf
  4. 3
      Nginx-S2I-Image/response.json

5
Nginx-S2I-Image/README.md

@ -0,0 +1,5 @@
# Using the Nginx S2I Image
```sh
oc new-app nginx~https://github.com/nmasse-itix/OpenShift-Examples.git --context-dir=Nginx-S2I-Image --name hello-world
```

17
Nginx-S2I-Image/index.html

@ -0,0 +1,17 @@
<html>
<body>
<pre id="log">
</pre>
<script language="javascript">
function reqListener () {
var log = document.getElementById("log");
log.innerText = this.responseText;
}
var oReq = new XMLHttpRequest();
oReq.addEventListener("load", reqListener);
oReq.open("GET", "/response.json");
oReq.send();
</script>
</body>
</html>

3
Nginx-S2I-Image/nginx.conf

@ -0,0 +1,3 @@
http {
keepalive_timeout 0;
}

3
Nginx-S2I-Image/response.json

@ -0,0 +1,3 @@
{
"message": "Hello, World!"
}
Loading…
Cancel
Save