This is a simple URL shortener
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
Néfix Estrada 6979f32b35 Merge branch 'release/v1.0.1' 10 місяці тому
cmd/urlshortener Added log write support 10 місяці тому
pkg Updated Makefile and improved the DB package 10 місяці тому
.gitignore Initial commit 10 місяці тому
Dockerfile Updated the Dockerfile 10 місяці тому
LICENSE Initial commit 10 місяці тому
Makefile Increased the deadline dramatically 10 місяці тому
README.md Added a recomendation 10 місяці тому

README.md

URL Shortener

This is a simple URL shortener. You can visit it live at https://short.nefixestrada.com

Tech stack

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.

How to run

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

As a standalone binary

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

Examples

Docker Compose

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:

FAQ

  • Why it doesn’t have support for HTTPS?
    • You are supposed to run it behind a proxy. If you have no idea what it is, you can check here for more inforrmation.
  • For any other question, you can contact me at nefixestrada@gmail.com