Added Node.js documentation +Doc Improvements
Adding Node.js documentation link for beginners, fix grammatical error, spacing and highlighting some keywords.
This commit is contained in:
parent
7fed7e80e7
commit
680fb45533
@ -14,10 +14,10 @@
|
|||||||
<h2>API Project: URL Shortener Microservice</h2>
|
<h2>API Project: URL Shortener Microservice</h2>
|
||||||
<h3>User Story: </h3>
|
<h3>User Story: </h3>
|
||||||
<ol>
|
<ol>
|
||||||
<li>I can POST a URL to <code>[project_url]/api/shorturl/new</code> and I will receive a shortened URL in the JSON response.<br>Example : <code>{"original_url":"www.google.com","short_url":1}</code></li>
|
<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 invalid URL 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>
|
<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>
|
||||||
HINT: 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.</li>
|
<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.(<a href="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>
|
<li>When I visit the shortened URL, it will redirect me to my original link.</li><br>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<h3>Short URL Creation </h3>
|
<h3>Short URL Creation </h3>
|
||||||
|
Loading…
Reference in New Issue
Block a user