Koko-Dev / bookmark-server

Small bookmark server, a python exercise with deployment

Home Page:https://bookmark-with-ease.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bookmark Server

A bookmark server or URL-shortening service, similar to TinyURL.com or goo.gl, but with no persistent storage.

This server will accept a URL and a short name, check that the URL actually works (returns an HTTP 200), then store it in a Python dictionary.

This is a bookmark server or URI shortener, that maintains a mapping (dictionary) between short names and long URIs, checking that each new URI added to the mapping actually works (i.e. returns a 200 OK).

This server is intended to serve three kinds of requests:

  • A GET request to the / (root) path. The server returns a form allowing the user to submit a new name/URI pairing. The form also includes a listing of all the known pairings.
  • A POST request containing "longuri" and "shortname" fields. The server checks that the URI is valid (by requesting it), and if so, stores the mapping from shortname to longuri in its dictionary. The server then redirects back to the root path.
  • A GET request whose path contains a short name. The server looks up that short name in its dictionary and redirects to the corresponding long URI.

About

Small bookmark server, a python exercise with deployment

https://bookmark-with-ease.herokuapp.com/


Languages

Language:Python 99.8%Language:Shell 0.2%