an example api written using endpoints
JavaScript