Skip to content

borischen0203/short_url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go URL Shortener using MongoDB

Demo Link

Sample

Introduce

This is a prototype of URL Shortener project. You can find the other one that I rewrite
in my repo. The new version is pure backend part without UI, I used gin framework and
make code more readable.
Link: https://github.com/borischen0203/URL-shortener

Features:

  • Generate short URL from long URL
  • Redirect to long URL by generated URL
  • URL generation supports custom alias

How to run in local

Instruction:

  1. Execute main.go file.
  2. Open browser on http://localhots:8000/
  3. Input the long URL in the field[Enter a long URL].
  4. (Optional)Input the the custom ID in the field[Custom alias].
     (make sure you input valid characters(A-Z,a-z,0-9))
  5. Submit
  6. Get the short URL!

Sample

   7. If the page shows the Alias is not available(be used), please try another one!

Sample

8. Input the generated short URL in browser, it will redirect to original URL.

Tech Stack

- MongoDB
- HTML
- CSS
- Go
- Heroku deploy

Releases

No releases published

Packages

No packages published