Adds conditional logic for API endpoints in dev/prod.