Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 833 Bytes

README.md

File metadata and controls

31 lines (26 loc) · 833 Bytes

A Simple Link Shortener

A simple link shortener. Inspired by Google's go link story.

This app is built to be lightweight in-company url shortener. The reason why we use YAML is because of it's kinda straightforward to do version control of the YAML file. In case we want a better performance, we can load YAML data into memcache and query link through that instead.

Written in Go. You can build it locally or use Docker.

Running using Docker

Build docker image with command below:

docker build -t linkshortener .

Run docker using this:

docker run \
-it -p 9091:9090 \
--rm \
--name myshortener \
-v "$(pwd)"/new_link.yaml:/root/new_link.yaml \
linkshortener --path=/root/new_link.yaml

Links YAML format

links:
  link1: https://www.github.com
  link2: https://www.google.com