Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Johan Jatko
nodejs-api-demo-plz-nooo
Commits
6fd9c2c6
Commit
6fd9c2c6
authored
Nov 08, 2020
by
Johan Jatko
Browse files
Update static/index.html
parent
398938f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
static/index.html
View file @
6fd9c2c6
...
...
@@ -6,13 +6,16 @@
<body>
<h1>
This is my awesome app
</h1>
<h2>
Latest api request was serverd from
<span
id=
"server"
>
NOTHING
</span></h2>
<button
onclick=
"apiii(); return false;"
>
Click me for API request
</button>
</body>
<script>
setTimeout
(
function
()
{
function
apiii
()
{
fetch
(
"
/api/gimmesome
"
).
then
(
function
(
response
)
{
server
=
document
.
querySelector
(
"
#server
"
);
server
.
innerHTML
=
response
;
console
.
log
(
response
)
server
.
innerHTML
=
response
.
text
();
});
},
2000
);
}
setTimeout
(
apiii
,
2000
);
</script>
</html>
\ No newline at end of file
</html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment