let createServer() accept a list of Endpoints