Skip to content

sajal48/UrlShortner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URL Shortener Application

Starting the Application

  1. Navigate to the docker-composes folder.

  2. Run the following command to start the Docker containers:

    docker compose -f .\docker-composer.yml up -d
  3. Wait for a minute to ensure all services are up and running.

  4. Start both applications.

Endpoints

Shorten URL

  • URL: /api/v1/url

  • Method: POST

  • Consumes: application/json

  • Produces: application/json

  • Request Body:

    {
      "longUrl": "https://example.com"
    }
  • Response Body:

    {
      "longUrl": "https://example.com",
      "shortUrl": "http://short.url/abc123"
    }

Get Long URL

  • URL: /api/v1/url/{shortUrl}
  • Method: GET
  • Path Variable: shortUrl (e.g., abc123)
  • Response: Redirects to the original long URL

Monitoring and Tracing

Now you can:

Prometheus Configuration

Prometheus is configured to scrape metrics from the Spring Boot application and itself. The configuration is defined in the prometheus.yml file.

About

Url shortner demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages