https://github.com/carloskvasir/api_ruby
Api sinatra
https://github.com/carloskvasir/api_ruby
api ruby sinatra
Last synced: over 1 year ago
JSON representation
Api sinatra
- Host: GitHub
- URL: https://github.com/carloskvasir/api_ruby
- Owner: carloskvasir
- License: mpl-2.0
- Created: 2025-03-28T16:45:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-28T18:35:07.000Z (over 1 year ago)
- Last Synced: 2025-03-28T19:23:09.023Z (over 1 year ago)
- Topics: api, ruby, sinatra
- Language: Ruby
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:
```bash
git clone git@github.com:carloskvasir/api_ruby.git
cd api_ruby
bundle install
```
## Running the Server
Start the Sinatra server with:
```bash
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:**
```bash
curl -X GET http://localhost:4567/hello
```
**Example Response:**
```json
{
"message": "Welcome to @caloskvasir Sinatra API!"
}
```
**Status Code:** 200 OK
## API Usage Examples
### Basic Request
```bash
curl http://localhost:4567/hello
```
## Development Roadmap
- [x] **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](LICENSE) file in the project root for the full license text.
## Contact
- LinkedIn: [linkedin.com/in/carloskvasir](https://linkedin.com/in/carloskvasir)
- GitHub: [github.com/carloskvasir](https://github.com/carloskvasir)