https://github.com/mskian/cycling-quotes-api
Cycling Quotes JSON API - Build using Prisma, Express and TypeScript.
https://github.com/mskian/cycling-quotes-api
bicycle cycle cycling express expressjs json json-api prisma quotes quotes-api quotes-generator sqlite sqlite3 strava typescript wccg
Last synced: 2 months ago
JSON representation
Cycling Quotes JSON API - Build using Prisma, Express and TypeScript.
- Host: GitHub
- URL: https://github.com/mskian/cycling-quotes-api
- Owner: mskian
- License: mit
- Created: 2022-03-03T07:15:50.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-11T16:35:27.000Z (over 2 years ago)
- Last Synced: 2024-12-29T21:14:16.568Z (4 months ago)
- Topics: bicycle, cycle, cycling, express, expressjs, json, json-api, prisma, quotes, quotes-api, quotes-generator, sqlite, sqlite3, strava, typescript, wccg
- Language: TypeScript
- Homepage:
- Size: 92.8 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cycling Quotes API

Cycling Quotes JSON API - Build using Prisma, Express and TypeScript
> Self Host this API Service for 100% Uptime
```sh
### 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/pushContent-Type: application/json
{
"quotes": "Hello World",
"author": "Hello"
}### PATCH - Update a Quotes
http://localhost:4000/push/1Content-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
```sh
git clone https://github.com/mskian/cycling-quotes-api.git
```- Open project directory
```sh
cd cycling-quotes-api
```- Install dependencies
```sh
yarn
```- Start Dev Server
```sh
yarn dev
```## Prisma Setup
- Migrate and Sync Database
```sh
npx prisma migrate dev
```- Reset Database
```sh
npx prisma migrate reset
```- Browser interference for Managing Database
```sh
npx prisma studio
```## Production
- Run the production build
```sh
yarn build
```- Start the production server
```sh
yarn start
```Quotes Credit - [90 Best Cycling Quotes To Motivate You](https://kidadl.com/articles/best-cycling-quotes-to-motivate-you)
## LISENSE
MIT