|
1 yıl önce | |
---|---|---|
cmd/urlshortener | 1 yıl önce | |
pkg | 1 yıl önce | |
.gitignore | 1 yıl önce | |
Dockerfile | 1 yıl önce | |
LICENSE | 1 yıl önce | |
Makefile | 1 yıl önce | |
README.md | 1 yıl önce |
This is a simple URL shortener. You can visit it live at https://short.nefixestrada.com
The program is written in Go. For database, it’s using bbolt, a fork of bolt. Also using govalidator for validating the URL’s and go.rice for embedding the static html files into the binary.
In order to run URL Shortener, you have two options:
You can easily run URL Shortener inside a Docker container. It’s the recommended choice. You just need to download it from Docker Hub:
sudo docker pull nefix/urlshortener:1
sudo docker run -p 3000:3000 nefix/urlshortener
You also can run it as a standalone binary. You need to execute the following commands:
git clone https://gitea.nefixestrada.com/nefix/urlshortener
cd urlshortener
make
This is going to generate a binary named urlshortener
version: '3.2'
services:
urlshortener_server:
volumes:
- type: volume
source: urlshortener_data
target: /data
read_only: false
ports:
- target: 3000
published: 8080
protocol: tcp
mode: host
restart: always
image: nefix/urlshortener:1
volumes:
urlshortener_data: