/url-shortener

🔗 A simple URL Shortener API

Primary LanguageJavaMIT LicenseMIT

🔗 A simple URL Shortener API

Stack

URL Shortener is built using:

  • Spring Framework, an application framework for the Java platform.
  • Spring Boot, an framework designed to simplify the bootstrapping and development Spring applications.
  • Gradle, an open-source build automation system. Feel free to use the gradlew on bash or gradlew.bat on windows cmd.

Requirements

The following software is required to be installed locally in order to get this project running:

  • Java 1.8
  • Docker

Run the project

  1. Make sure you have a functional docker environment

  2. Clone from github (this will create url-shortener in the current directory)

git clone https://github.com/diogolundberg/url-shortener.git
cd url-shortener
  1. Build the project
gradlew build
  1. Run the project
docker-compose up

Try it

curl -XPOST localhost:8080/shorten -H 'Content-Type: application/json' -d '{
  "url": "https://www.example.com/"
}'

No curl?