installation.md
May 17, 2026 ยท View on GitHub
Getting Started
Table of Content
Easy Deployment
You can deploy this app to the cloud with a single click using Railway. This will set up a new project, create a new PostgreSQL database, and deploy the app.
After deployment is complete, you need to configure the Public Networking to make your API accessible from the internet.
Prerequisite
- Node.js (version 22 or higher)
- pnpm (version 11 or higher)
- Database provider you want to use. We currently support MongoDB, PostgreSQL, MySQL, and SQLite.
Installation Steps
-
Clone the repository
Use
git clonecommand, to clone this repository using HTTPS or SSH. -
Install the dependencies
Use
pnpm installcommand, to install all the dependencies. -
Configure the environment variables
-
Create
.envfile by simply copying the.env.examplefile and rename it. -
Set the
APP_HOSTandAPP_PORT. -
You can enable rate limiting by setting the
APP_ENABLE_THROTTLEto betrue. You also can customize theAPP_THROTTLE_TTLandAPP_THROTTLE_LIMITas desired. -
You can also customize the pagination feature by setting the
APP_PAGINATION_MAX_PAGE_SIZEandAPP_PAGINATION_DEFAULT_PAGE_SIZE.Note!
Set the
APP_PAGINATION_MAX_PAGE_SIZEvalue wisely, as it will determine the amount of resource usage (the size of queries to the database). -
Set the
DB_PROVIDERwith the data sourceprovideryou want to use. Current supported providers: 'mongodb', 'postgresql', 'mysql', and 'sqlite'. -
Set the
DB_HOST,DB_PORT,DB_USERNAME,DB_PASSWORD,DB_USERNAME, andDB_PASSWORD. See the connection string documentation.If you use local database, you must grant read-write access to the database.
-
-
Generate the database
Run
pnpm run db:migratecommand to generate the database.You can use
npx prisma migrate deploycommand to run migration in non-development environments and if you are using any database providers other than MongoDB. See the details here. -
Seed the data
Run
pnpm run db:seedcommand to seed the data. -
Run the app
Use
pnpm run startcommand, to run the app.
Installation with Docker
We also provide Docker configuration with PostgreSQL database support.
-
Fork and clone this project.
-
Configure the environment variables.
DB_PROVIDERmust be set intopostgresql.DB_HOSTmust be set intodb.
-
Run
docker compose upcommand to build and run the app.If you change the database provider, you need to rebuild the Docker image using
docker compose up --buildcommand. -
Finish
Run the Test
To run the test, you can use the following command:
# Run unit tests
pnpm run test
# Run e2e test
pnpm run test:e2e
# Run coverage test
pnpm run test:cov