Skip to content

poodingia/shrink.it

Repository files navigation

shrink.it

A microservices-based URL shortening system built with Java Spring Boot and Go.

Build Instructions

Prerequisites

  • JDK 17+ (Eclipse Temurin preferred)
  • Gradle 8.10.2+
  • Docker 27.2.0+
  • Nginx 1.26.2+
  • Node.js 20.11.0+ (for the frontend)

Setting Up the Project

  • Configure nginx using the provided nginx/default.conf.template file. Modify it to fit your deployment environment.

Running the Backend

Building

Build the entire backend project:

./gradlew build

Build a specific backend module:

./gradlew :<module-name>:build

Running

Run the entire backend project:

./gradlew bootRun

Run a specific backend module:

./gradlew :<module-name>:bootRun

To run multiple instances of a module on different ports:

./gradlew :<module-name>:bootRun --args='--server.port=<port>'

Running the Frontend

Setting Up

Create a .env file based on the ui/.env.template file and populate environment variables.

Install dependencies:

cd ui
npm ci

Running

Start development server:

npm run dev

Running all services with Docker Compose

Docker Compose allows running both the backend and frontend services together.

Build Docker images:

docker-compose build

Start Docker containers:

docker-compose up

Or, to build and start the containers in one step:

docker-compose up --build

Stop running containers:

docker-compose down

About

Advanced URL Shortener

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors