Url shortener microservice with multi database(mongo and redis) and multi format(json and msgpack) support 🐳
To use this, run the command down below. Default selected database is redis for now. JSON and MSGPACK formats are supported as long as right content type is received.
$ git clone github.com/MrWormHole/url-shortener.git
$ docker-compose up -d
For mongodb, you need to add mongodb to docker-compose file and provide environment values(URL_DB: "mongo", MONGO_URL, MONGO_DB, MONGO_TIMEOUT)
{
"url" : "www.website.com/asdasdasdadasd"
}
{
"hash": "ASDXASD"
"url" : "www.website.com/asdasdasdadasd"
"created_at": 3241233443521
}
This will redirect you to saved url.