Update example.js

Updating with external object example. Providing detailed comments for route configuration options.