Skip to content

umizu/kiri

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kiri

Kiri, the URL shortener that slices your long links into bite-sized pieces.

"Kiri" (切り) in Japanese can mean "slice", and that's exactly what this service does your URLs – trim them for easier sharing.

Getting started

Using Docker

  1. Navigate to the root directory of the project

  2. Spin up the api and postgres container with docker-compose

docker compose up

Alternatively, add the -d flag to run the containers in the background.

docker compose up -d

Cleaning up

docker compose down

Running locally

  1. Kiri depends on Postgres for data storage. Ensure that you have an instance running locally with properties that match the ConnectionString value in your appsettings.Local.json file.

  2. Start the API by running the following command from the root directory of the project.

dotnet run --project src/Kiri.Api

API Documentation

Ref -> http://localhost:9000/swagger/index.html


ShortenURLRequest

POST /api/shorten

{
  "url": "https://genius.com/Rick-astley-never-gonna-give-you-up-lyrics"
}

ShortenURLResponse

{
  "url": "http://kiri.ly/a1b2c3d4"
}