Skip to content

brunogeronimo/urlshortener

Repository files navigation

URL Shortener

This project contains a URL shortener written in Go.

Basics

The main goal of it is to be able to have a URL Shortener service without the need of a database running on the background. All URLs are parsed from a static JSON file (example) and remain in memory until the app execution is finished.

If the config file is changed, the app has to be restarted (for now). If you run it on Google App Engine on a free tier, there is no need for restarting, since App Engine kills all instances if they are not used for a while.

Running the project

The following env variables have to be defined:

Name Description Required Default Value
CONFIG_URL Contains the config JSON file with all settings yes
PORT Port to run the application no 8080

Ways to run the project

Docker

Just pull the desired image from Docker Hub.

docker pull -eCONFIG_URL=<url> -p=8080:8080 brunogeronimo/urlshortener:latest

About

URL Shortener written in GoLang

Resources

License

Stars

Watchers

Forks

Packages

No packages published