Skip to content

dimoynwa/url-shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golang example project to shorten urls. You can store url in database (MongoDb or Redis). It will generate unique code and store the URL. Then you can call \{code} and it will redirect you to the stored URL.

Environment variables needed:

  • PORT - integer, if not presented 8000 will be used as default
  • URL_DB - (required) redis or mongodb Redis:
    • REDIS_URL - url to redis database Mongo DB:
    • MONGO_URL - url to mongo database
    • MONGO_DB - database name
    • MONGO_TIMEOUT - connection timeout in seconds

To start the project: go run .\main.go

About

Golang practice project to shorten urls implementing Hexagonal architecture

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages