Installation Guide - rzkytmgr/quran-api GitHub Wiki
Local Installation
This section will walk you through the steps to install and set up the Static Quran Restful API on your local machine or server. The API is built using Node.js with either JavaScript or TypeScript, and it utilizes the Express web framework to provide a simple yet efficient way to access Quranic data and Murottal audio.
Prerequisites
- Node.js (Version >= v20)
The project requires Node.js version 20 or higher. If you don't have it installed, you can use nvm (Node Version Manager) to easily install and manage Node versions on your machine. To install Node.js via nvm, run the following commands:
nvm install 20
nvm use 20
- pnpm (Version >= v10)
The project uses pnpm (a fast, disk space-efficient package manager) instead of npm. Ensure you have pnpm version 10 or higher installed. You can install pnpm globally using the following command:
npm install -g pnpm
Installation Steps
- Clone the repository
Begin by cloning the repository to your local machine. In your terminal, run the following command:
git clone https://github.com/rzkytmgr/quran-api.git
- Navigate to the Project Directory
Change into the project directory:
cd quran-api
- Install Project Dependencies
Once you're in the project directory, run the following command to install the dependencies using pnpm, This will download and install all the required libraries and packages listed in the package.json file:
pnpm install
-
Configure the Application
You can rename.env.example
file to.env
. If you want to adjust the value on that file you can do it with yourself. -
Run the Application
This command will launch the server on the default port (http://localhost:3000), or another port if specified in your configuration file.
pnpm build && pnpm start
- Verify the API
Open your browser or use a tool like Postman to check that the API is running correctly by visiting:
http://localhost:3000/api/v1/
Additional Notes
- Multilingual Support: The API currently supports English and Bahasa Indonesia. You can contribute by adding other languages or adjusting translation files in the project folder.
- Audio Files: The API supports Murottal audio from multiple reciters. Please note that these audio files are fetched from third-party services, which may occasionally experience downtime.
Vercel Deploy
You can deploy to your vercel with only one click. Click the Vercel deploy button below to deploy it.