-
Install dependencies:
bundle install
-
Setup database:
rails db:create db:migrate
-
Run the server:
rails s
rspec
URL: POST /encode
Request Body
{
"url": "https://codesubmit.io/library/react"
}
Code : 200 OK
Content example
{
"url": "https://codesubmit.io/library/react",
"short_url": "https://short.est/GeAi9K"
}
URL: POST /decode
Request Body
{
"short_url": "https://short.est/GeAi9K"
}
Code : 200 OK
Content example
{
"url": "https://codesubmit.io/library/react",
"short_url": "https://short.est/GeAi9K"
}