Files
ruflo/v2/examples/rest-api-simple
rUvandClaude Opus 4.5 1b6a1971f7 feat(v3): add comprehensive v3 implementation plans and swarm architecture
- Reorganize v3/ into implementation/ subfolders:
  - planning/, architecture/, migration/, integration/
  - security/, adrs/, research/, swarm-plans/

- Add 15-agent concurrent swarm implementation plans:
  - SWARM-OVERVIEW.md: Hierarchical mesh topology, 4 phases
  - AGENT-SPECIFICATIONS.md: 15 agent configs with capabilities
  - TDD-LONDON-SCHOOL-PLAN.md: Mock-first TDD methodology
  - BENCHMARK-OPTIMIZATION.md: Performance targets (2.49x-7.47x)
  - DEPLOYMENT-PLAN.md: Release strategy, CI/CD, rollback
  - GITHUB-ISSUE-TRACKING.md: Issue workflow with agent replies

- Update .claude/settings.json with proper hooks format
- Add bash aliases for claude --dangerously-skip-permissions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 15:40:51 +00:00
..

Simple REST API

A super simple REST API built with Express.js that demonstrates basic CRUD operations.

Features

  • In-memory data storage
  • Full CRUD operations (Create, Read, Update, Delete)
  • JSON request/response format
  • Health check endpoint
  • No database required

Installation

npm install

Running the API

# Production mode
npm start

# Development mode with auto-reload
npm run dev

The API will start on port 3000 by default, or use the PORT environment variable.

API Endpoints

Root Endpoint

  • GET / - Welcome message and endpoint list

Items Resource

  • GET /api/items - Get all items
  • GET /api/items/:id - Get a single item by ID
  • POST /api/items - Create a new item
  • PUT /api/items/:id - Update an existing item
  • DELETE /api/items/:id - Delete an item

Health Check

  • GET /health - API health status

Example Usage

Get all items

curl http://localhost:3000/api/items

Get a single item

curl http://localhost:3000/api/items/1

Create a new item

curl -X POST http://localhost:3000/api/items \
  -H "Content-Type: application/json" \
  -d '{"name": "New Item", "description": "This is a new item"}'

Update an item

curl -X PUT http://localhost:3000/api/items/1 \
  -H "Content-Type: application/json" \
  -d '{"name": "Updated Item", "description": "This is an updated item"}'

Delete an item

curl -X DELETE http://localhost:3000/api/items/1

Response Format

Success Response

{
  "id": 1,
  "name": "Item 1",
  "description": "This is the first item"
}

Error Response

{
  "error": "Item not found"
}

Notes

  • Data is stored in memory and will be lost when the server restarts
  • No authentication or authorization is implemented
  • This is a demonstration API for learning purposes