Romaji to Kana Converter: Angular & Express — Chapter 8, Exercise 2 ===================================================================== TASK Configure the nginx location /romaji/ block against a real running instance of the app (a second local nginx config is fine for testing), and confirm both a page load and a real /api/convert request succeed through the proxy, with server.js completely unchanged from Chapter 7. SOLUTION // /etc/nginx/sites-available/romaji-test (a local test vhost, e.g. // listening on port 8080 so it doesn't collide with anything else) server { listen 8080; server_name localhost; location /romaji/ { proxy_pass http://localhost:4000/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } } $ sudo ln -s /etc/nginx/sites-available/romaji-test /etc/nginx/sites-enabled/ $ sudo nginx -t && sudo systemctl reload nginx With the real Express server from Chapter 7 already running on port 4000 (server.js completely untouched -- no edits made to it for this exercise at all): $ curl -s http://localhost:8080/romaji/ | grep -o '