https://github.com/clevercloud/ruby-multi-redirect-example
A Ruby project based on Puma web server and Sinatra DSL, managing multiple redirections.
https://github.com/clevercloud/ruby-multi-redirect-example
clevercloud-example dsl puma redirections ruby sinatra
Last synced: 8 months ago
JSON representation
A Ruby project based on Puma web server and Sinatra DSL, managing multiple redirections.
- Host: GitHub
- URL: https://github.com/clevercloud/ruby-multi-redirect-example
- Owner: CleverCloud
- Created: 2024-02-23T19:52:59.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-26T01:28:46.000Z (over 2 years ago)
- Last Synced: 2025-09-30T05:48:42.148Z (9 months ago)
- Topics: clevercloud-example, dsl, puma, redirections, ruby, sinatra
- Language: Ruby
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ruby - Clever Cloud Puma+Sinatra Redirections demo
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](https://console.clever-cloud.com/) and [Clever Tools](https://github.com/CleverCloud/clever-tools).
## Setup Clever Tools
```bash
npm i -g clever-tools
clever login
```
## Init the project
```bash
git clone https://github.com/CleverCloud/ruby-multi-redirect
cd ruby-multi-redirect
```
## Create the application and deploy on Clever Cloud
```bash
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.