API for getting the quote of the day. Developed for Boost Clock, to bypass CORS policy and provide quotes in JSON format.
- Fetch Quote of the Day: API returns a random quote in JSON format.
- Caching: The quote is stored for the day to reduce the number of requests to the external API.
- Easy to use: Just send a GET request to
/api/quote.
Open a terminal and run the command:
git clone https://github.com/flionx/quote-api.gitqute-api/
├─── dist/ # Compiled files
├─── api/ # Source files
│ └─── quote.ts # Server main file
├──── tmp/ # Temporary files (locally)
├─── package.json # Dependencies and scripts
├──── tsconfig.json # TypeScript configuration
├──── vercel.json # Vercel configuration
└─── README.md # Documentation
Go to GitHub and create a new repository.
#1. Navigate to the folder with the cloned project:
cd qute-api
#2Remove the link to the original repository:
rm -rf .git
#3. Initialize a new Git repository:
git init
#4. Add a remote repository (replace `your-username` and `your-репозиторий` with your credentials):
git remote add origin https://github.com/your-username/your-repo.git
#5. Add the files and make the first commit:
git add .
git commit -m "Move Qute API to my repository"
#6. Push the changes to GitHub:
git push -u origin main- Go to Vercel and log in via GitHub.
- Click New Project.
- Select your repository (
your-repo). - Leave the default settings and click Deploy.
- Once the deploy is complete, you will receive a link to your API (e.g.,
https://example.vercel.app).
{
"text": "Either you think, or else others have to think for you and take power from you, pervert and discipline your natural tastes, civilize and sterilize you.",
"author": "F. Scott Fitzgerald",
"date": "2025-03-10"
}
This project is distributed under the MIT license. See the LICENSE file for details.