This project implements a lightweight RESTful API using Ruby and Sinatra. It serves as a component for a larger university coursework project, providing JSON responses through well-defined endpoints.
- Simple and lightweight architecture
- JSON-formatted responses
- RESTful design principles
- Easy to extend
- Ruby (recommended 3.0+)
- Bundler (2.0+)
- Git
Clone the repository and install dependencies:
git clone git@github.com:carloskvasir/api_ruby.git
cd api_ruby
bundle installStart the Sinatra server with:
ruby server.rbBy default, the server runs on port 4567.
Returns a welcome message to verify the API is working correctly.
Endpoint: GET /hello
Parameters: None
Example Request:
curl -X GET http://localhost:4567/helloExample Response:
{
"message": "Welcome to @caloskvasir Sinatra API!"
}Status Code: 200 OK
curl http://localhost:4567/hello- Implement basic
/helloendpoint (smoke test) — ✅ March 28, 2025
This project is licensed under the Mozilla Public License 2.0 (MPL-2.0). See the LICENSE file in the project root for the full license text.
- LinkedIn: linkedin.com/in/carloskvasir
- GitHub: github.com/carloskvasir