Skip to content

Cycling Quotes JSON API - Build using Prisma, Express and TypeScript.

License

Notifications You must be signed in to change notification settings

mskian/cycling-quotes-api

Repository files navigation

Cycling Quotes API

build-test

Cycling Quotes JSON API - Build using Prisma, Express and TypeScript

Self Host this API Service for 100% Uptime

### GET - Get Random single Quotes
http://localhost:4003/random

### GET - Get all the Quotes from db
http://localhost:4003/quotes

### GET -Get single Quotes by id
http://localhost:4003/quotes/1

### POST - Post New Quotes
http://localhost:4003/push

Content-Type: application/json

{
  "quotes": "Hello World",
  "author": "Hello"
}

### PATCH - Update a Quotes
http://localhost:4000/push/1

Content-Type: application/json

{
  "author": "Hello World",
  "name": "Hello"
}

### DELETE - Delete a Quotes
http://localhost:4003/push/1

Stack Specs

  • Node.js
  • Express
  • TypeScript
  • Prisma
  • Sqlite

Development

  • Clone the repository
git clone https://github.com/mskian/cycling-quotes-api.git
  • Open project directory
cd cycling-quotes-api
  • Install dependencies
yarn
  • Start Dev Server
yarn dev

Prisma Setup

  • Migrate and Sync Database
npx prisma migrate dev
  • Reset Database
npx prisma migrate reset
  • Browser interference for Managing Database
npx prisma studio

Production

  • Run the production build
yarn build
  • Start the production server
yarn start

Quotes Credit - 90 Best Cycling Quotes To Motivate You

LISENSE

MIT