Docker containers running sample nodejs app among others tools for learning purposes.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

34 lines
895 B

<script>
function getAPI(){
fetch('http://localhost:3001/restricted')
.then(function (res){
res.json().then(function(data){
document.getElementById('output').innerHTML = JSON.stringify(data);
console.log(JSON.stringify(data));
console.log(JSON.stringify(data, ['message']));
console.log('why, though');
console.log(Object.values(data));
console.log(Object.keys(data));
console.log(res.headers)
})
})
}
</script>
<html>
<meta charset="UTF-8">
<body onload="getAPI()">
<div>
<h1>SUCCESS</h1>
</div>
<div>
<h2>YOU ARE LOGGED</h2>
</div>
<div>
<h3>Also if you see the message below you have access to resctricted content:</h3>
<h3 id="output"></h3>
</div>
</body>
</html>