add the anonymous functions to initialize the service and metrics endpoints as... See merge request mec/AdvantEDGE!19