summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkmeister <kris@aliencom.net>2017-04-13 17:53:09 -0400
committerkmeister <kris@aliencom.net>2017-04-13 17:53:09 -0400
commite8b02fa2be50e8972cdf163022dfa7eb2c524821 (patch)
tree8f7aafb147b0d5160e2ee3229e684a039956989c
parente1686caf5e9cfa597151d04686334e31bf462670 (diff)
[docker-example] clarification
-rw-r--r--examples/docker/README.md2
-rw-r--r--examples/docker/web/public/js/main.js5
2 files changed, 2 insertions, 5 deletions
diff --git a/examples/docker/README.md b/examples/docker/README.md
index bf9fb01..55566b1 100644
--- a/examples/docker/README.md
+++ b/examples/docker/README.md
@@ -19,7 +19,7 @@ docker-compose start -d
#### Then follow these steps:
1. Visit the http://localhost:3000/admin to configure Ponzu.
-2. Add several songs http://localhost:3000/admin/reviews
+2. Add several songs http://localhost:3000/admin/contents?type=Song
3. Visit http://localhost:3000/ to see the rest service accessed via AJAX
Stop the containers:
diff --git a/examples/docker/web/public/js/main.js b/examples/docker/web/public/js/main.js
index cce225b..f9ae5fc 100644
--- a/examples/docker/web/public/js/main.js
+++ b/examples/docker/web/public/js/main.js
@@ -1,9 +1,6 @@
(function() {
- let mainContainer;
-
function loadHomepage() {
- mainContainer = document.querySelector('#main');
const xhr = new XMLHttpRequest();
xhr.open('GET', '/api/contents?type=Song');
xhr.onreadystatechange = renderHomepage;
@@ -38,7 +35,7 @@
html = '<p><strong>The /api endpoint did not respond correctly :-(</strong></p>';
}
- mainContainer.innerHTML = html;
+ document.querySelector('#main').innerHTML = html;
}
}