urlshortener/views/index.html
2020-09-18 18:01:11 +09:00

42 lines
1.3 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<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 href="/public/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>API Project: URL Shortener Microservice</h1>
<main>
<section>
<h2>Short URL Creation</h2>
<form action="api/shorturl/new" method="POST">
<fieldset>
<legend>URL Shortener</legend>
<label for="url_input">URL:</label>
<input id="url_input" type="text" name="url" value="https://www.freecodecamp.org" />
<input type="submit" value="POST URL" />
</fieldset>
</form>
</section>
<section>
<h3>Example Creation:</h3>
<p><code>POST [project_url]/api/shorturl/new</code> - Body (URL encoded): <code>url=https://www.google.com</code></p>
<h3>Example Usage:</h3>
<a href="https://url-shortener.freecodecamp.repl.co/api/shorturl/3">[project_url]/api/shorturl/3</a>
<h3>Will Redirect to:</h3>
<p>https://forum.freecodecamp.org/</p>
</section>
</main>
<footer>
<p>By <a href="https://www.freecodecamp.org">freeCodeCamp</a></p>
</footer>
</body>
</html>