Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruby API Project

Overview

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.

Features

  • Simple and lightweight architecture
  • JSON-formatted responses
  • RESTful design principles
  • Easy to extend

Requirements

  • Ruby (recommended 3.0+)
  • Bundler (2.0+)
  • Git

Installation

Clone the repository and install dependencies:

git clone git@github.com:carloskvasir/api_ruby.git
cd api_ruby
bundle install

Running the Server

Start the Sinatra server with:

ruby server.rb

By default, the server runs on port 4567.

API Documentation

GET /hello

Returns a welcome message to verify the API is working correctly.

Endpoint: GET /hello

Parameters: None

Example Request:

curl -X GET http://localhost:4567/hello

Example Response:

{
  "message": "Welcome to @caloskvasir Sinatra API!"
}

Status Code: 200 OK

API Usage Examples

Basic Request

curl http://localhost:4567/hello

Development Roadmap

  • Implement basic /hello endpoint (smoke test) — ✅ March 28, 2025

License

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.

Contact

About

Api sinatra

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages