URL Shortener Microservice using async/await

Hi out there!
Eat this!

Interesting, I didn’t knew there was a method such as dns.promises .
I had to write a whole callback instead to return whether a resolved or rejected promise, the more you know.

return new Promise((resolve, reject) => dns.lookup(hostname, (err, address, family) => (err) ? reject(err) : resolve(address)));

BTW, you have double semicolon on line 22 in controller.js. Curiously, It doesn’t break the code.

Thank you for having a look!