Skip to content

Lomank123/shrinker

Repository files navigation

shrinker

URL shortener using NodeJS (express) and MongoDB (mongoose).

Prerequisites

  • NodeJS
  • Docker, docker-compose

Installation

  • Clone repository:
git clone https://github.com/Lomank123/shrinker.git
  • Copy .env.sample to .env and change env variables if needed:
cp .env.sample .env
  • Install all packages:
npm install
  • Build and up the DB container:
docker compose up -d --build

Run

  • Run the app:
npm run start

Usage

The app provides 2 API endpoints:

  • POST / - Generate new short url from given url
  • GET /:shortHash - Redirect from short url to the original one

Extra

Remained tasks:

  • Dockerize main app
  • Add Bloom Filters (if possible)
  • Add tests
  • Add frontend

About

URL shortener written in NodeJS (express)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published