Working full stack forums get

This commit is contained in:
2017-06-12 13:37:48 +03:00
parent b4d10b7bff
commit aeb18aa75b
23 changed files with 484 additions and 15 deletions

View File

@@ -1,2 +1,16 @@
<h1>api</h1>
<a href="/api/foorum">foorum</a>
<a href="/api/foorum">foorum</a>
<button onclick="getForums()">GetAll</button>
<code><pre id="output"></pre></code>
<script>
function getForums() {
var out = document.getElementById("output");
fetch("/api/foorum").then(resp => {
return resp.json();
}).then(data => {
console.log(data);
out.innerText = JSON.stringify(data, null, 2);
});
}
</script>