Use http.createServer for both cases.