added callback setting for server startups and emitted events for http.listen and https.listen