fix: html formatting and grammar

This commit is contained in:
Kris Koishigawa 2020-09-14 18:24:04 +09:00
parent 19641b95fa
commit 0f7269582b

View File

@ -3,7 +3,11 @@
<html> <html>
<head> <head>
<title>URL Shortener</title> <title>URL Shortener</title>
<link rel="shortcut icon" href="https://cdn.hyperdev.com/us-east-1%3A52a203ff-088b-420f-81be-45bf559d01b1%2Ffavicon.ico" type="image/x-icon" /> <link
rel="shortcut icon"
href="https://cdn.hyperdev.com/us-east-1%3A52a203ff-088b-420f-81be-45bf559d01b1%2Ffavicon.ico"
type="image/x-icon"
/>
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet" type="text/css" /> <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet" type="text/css" />
<link href="/public/style.css" rel="stylesheet" type="text/css" /> <link href="/public/style.css" rel="stylesheet" type="text/css" />
</head> </head>
@ -13,10 +17,16 @@
<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> <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 /> I can POST a URL to <code>[project_url]/api/shorturl/new</code> and I will receive a shortened URL in the JSON
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. response.<br />
Example : <code>{ "original_url": "www.google.com", "short_url": 1 }</code>
</li>
<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 />
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> </li>
<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>
</ol> </ol>