This repository contains a Ruby web application based on Puma server and Sinatra DSL, demonstrating how to define routes and different kind of redirections. You'll need a Clever Cloud account and Clever Tools.
npm i -g clever-tools
clever login
git clone https://github.com/CleverCloud/ruby-multi-redirect
cd ruby-multi-redirect
clever create -t ruby
git add . && git commit -m "Initial commit"
clever deploy
clever open
You can now visit /api
to get a visible redirection and /lost
to get an invisible redirection. You also can get answers from the /
and /json
routes. Any other will reply with a 404
HTTP status code.