crystal-api
Version, currently master branch1 version
- master branchlatestMar 24, 2025
github.com/Zxce3/Learn-Crystal
idk :trollface:
0 stars
0 dependents
License: not declared
Installation
# Add this to your shard.yml
dependencies:
crystal-api:
github: Zxce3/Learn-Crystal
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
- no constraint declared
- Author
- Zxce3
- Target
crystal-apifrom src/api.cr
Dependencies
This version declares no dependencies.
README
Learn-Crystal
Project Description
This project is a simple API server built with the Crystal programming language. The purpose of this project is to demonstrate how to create a basic API server using Crystal, including handling HTTP requests, serializing JSON data, and managing sample data.
Installation Instructions
- Dependencies: Ensure you have Crystal installed on your system. You can download and install Crystal from the official website: https://crystal-lang.org/install/
- Clone the repository:
git clone https://github.com/Zxce3/Learn-Crystal.git cd Learn-Crystal - Install dependencies:
shards install
Usage Examples
-
Run the server:
crystal run src/api.crThe server will start running at
http://localhost:3000. -
Make API requests:
- Get all users:
curl http://localhost:3000/api/users - Get a user by ID:
curl http://localhost:3000/api/users/1
- Get all users:
API Endpoints
- GET /api/users: Returns a list of all users.
- GET /api/users/:id: Returns a user with the specified ID.
Authors and Contributors
- Zxce3
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Mar 24, 2025
- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/Zxce3/Learn-Crystal
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 1