From e8b02fa2be50e8972cdf163022dfa7eb2c524821 Mon Sep 17 00:00:00 2001 From: kmeister Date: Thu, 13 Apr 2017 17:53:09 -0400 Subject: [docker-example] clarification --- examples/docker/README.md | 2 +- examples/docker/web/public/js/main.js | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'examples') 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 = '

The /api endpoint did not respond correctly :-(

'; } - mainContainer.innerHTML = html; + document.querySelector('#main').innerHTML = html; } } -- cgit v1.2.3