-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.html
More file actions
28 lines (28 loc) · 999 Bytes
/
index.html
File metadata and controls
28 lines (28 loc) · 999 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<html>
<style>
body {font-family: Verdana, Geneva, Tahoma, sans-serif;}
</style>
<head>
<script>
function report(text, divId) {
var el = document.getElementById(divId), brNode = document.createElement('br'), textNode = document.createTextNode(text)
el.appendChild(textNode)
el.appendChild(brNode)
}
function fetchServant(servant) {
fetch(servant)
.then(r => r.text()).then(text => report(text, 'info'))
.catch(e => console.error(e) && report(e, 'error'))
}
</script>
</head>
<body>
<h1>Hello ##TARGET!</h1>
<p>I am at version: ##VERSION</p>
<p>Where are my servants at?</p>
##BUTTONS
<div id="info" style="background-color: green; color: white;"></div>
<div id="error" style="background-color: red; color: white;"></div>
<p>Source on GitHub: <a href="https://github.com/redkubes/nodejs-helloworld">redkubes/nodejs-helloworld</a></p>
</body>
</html>