This project contains a URL shortener written in Go.
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.
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 |
Just pull the desired image from Docker Hub.
docker pull -eCONFIG_URL=<url> -p=8080:8080 brunogeronimo/urlshortener:latest