GroundNF / url-shortener-1

A fully dockerized, self hostable URL shortener.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

URL Shortener

A fully dockerized, self-hostable link shortening web application.

Built with NodeJS, TypeScript, and MongoDB.

demo gif

Features

  • Validation upon creation (duplicates, invalid URLs, redirect loops, etc.)
  • Dockerized NodeJS and MongoDB
  • Live reload and compilation of TypeScript files

Potential Features

  • Custom URL expiry
  • User registration to add/modify/delete URL redirects
  • Rate limiting
  • Click/Impression tracking

Quick Start

  • Clone this repo: git clone https://github.com/jengmicah/url-shortener.git
  • Duplicate .env.example and rename to .env
    • Set SERVER_URI to server host
      • Note that the port of SERVER_URI corresponds with the exposed host port in docker-compose.yml (host:container)
      • The exposed port in Dockerfile corresponds with the exposed container port in docker-compose.yml (host:container) as well as the server port specified in src/index.ts.
    • Set NODE_ENV to development or production
  • Run ./_build.sh to run the docker-compose.yml
    • May need to run chmod +x _build.sh beforehand

About

A fully dockerized, self hostable URL shortener.


Languages

Language:TypeScript 73.5%Language:HTML 23.1%Language:Dockerfile 2.7%Language:Shell 0.7%