switch example to use deployments instead of applying config changes directly

I think `curl http://localhost:5001/` is better. Also, having a variable like `OSHOST` is better  than having the value hard coded.