summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-19 19:30:57 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-19 19:30:57 -0400
commit15ce44fdc007fe01a63e0d3b5f667adf07b864a3 (patch)
treed301ea903b74091a89a0e38ca886308b92cafed8
parent9bc0c33a952dc906344964890bce58761d6ce2c7 (diff)
docs: Added a README.md
Added a README.md file that explains the endpoints and their responses and has a todo list.
-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
+