summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..679baac
--- /dev/null
+++ b/README.md
@@ -0,0 +1,23 @@
+# URL Shortener
+
+This is a simple Go program to provide an api for shortening URLs.
+
+## Endpoints
+
+- `/shorten`: This endpoint accepts post requests to shorten URLs.
+
+Request JSON: `{ "URL" : string }`
+Response JSON: `{ "Version" : string, "Status" : string, "Original" : string, "New" : string }`
+
+- `/[A-Za-z0-9]{4,}`: This will return HTTP 301 and the new location if a URL is associated with this endpoint or HTTP 404 if not.
+
+## TODO
+
+- Check API Keys for `/shorten`
+
+- Check if URL is already Shortened
+
+- Connect to a database for persisent storage
+
+- Better Error Handling
+