<li>I can <b>POST</b> a <b>URL</b> to <code>[project_url]/api/shorturl/new</code> and I will receive a shortened <b>URL</b> in the JSON response.<br><br><i>Example</i> : <code>{"original_url":"www.google.com","short_url":1}</code></li><br><br>
<li>If I pass an <b>invalid URL</b> that doesn't follow the <code>http(s)://www.example.com(/more/routes)</code> format, the JSON response will contain an error like <code>{"error":"invalid URL"}</code><br><br>
<b><i>HINT</i></b>: To be sure that the submitted URL points to a valid site, you can use the function <code>dns.lookup(host, cb)</code> from the <code>dns</code> core module. Incase you are new to NodeJs, you can learn about this function from its documentation.(<ahref="https://nodejs.org/api/dns.html">NodeJs Documentation</a>)</li><br><br>
<li>When I visit the shortened URL, it will redirect me to my original link.</li><br>