Skip to content

Ultra minimalistic express api to fetch saints phrases

Notifications You must be signed in to change notification settings

Redentor-GST/besaints-api

Repository files navigation

applogo

Be Saints API

codecov

A minimalistic API for saints phrases

Features

  • Database Integrity: Ensures unique dates and prevents app startup if database is not populated
  • Auto-population: Database automatically populates on each startup
  • Daily Phrases: Get the phrase of the day based on current date
  • Comprehensive API: Full CRUD operations for saints and phrases
  • Testing: Complete test suite for all endpoints

API Endpoints

Phrases

  • GET /api/phrases/all - Get all phrases
  • GET /api/phrases/random - Get a random phrase
  • GET /api/phrases/daily - Get today's phrase
  • GET /api/phrases/:id - Get phrase by ID
  • GET /api/phrases/author/:author - Get phrases by author
  • GET /api/phrases/date/:date - Get phrases by date (MM-DD format)

Saints

  • GET /api/saints/all - Get all saints
  • GET /api/saints/:id - Get saint by ID
  • GET /api/saints/name/:name - Get saint by name
  • GET /api/saints/date/:date - Get saints by date (MM-DD format)
  • GET /api/saints/search/:query - Search saints by name or description

Installation

npm install

Development

npm run dev

Testing

npm test

Database

The API uses SQLite with automatic population. The database will be created and populated on first run, and the app will not start if the database is empty.

Want to contribute? Contact me

About

Ultra minimalistic express api to fetch saints phrases

Resources

Stars

Watchers

Forks