This is a RESTful API built using Typescript, Fastify, MySQL and Prisma ORM. This API helps users to refer and get referred.
Clone the repository to your local machine.
git clone https://github.com/adesiyanoladipo/Typescript-Referral-System
Ensure that you have Typescript, Fastify, MySQL and Prisma ORM on your machine. You could use their cloud services. Navigate to the root directory of the project in a terminal.
cd Typescript-Referral-System
Run the following command to install the necessary dependencies
npm install
Add a .env file following .env.example file example with the values of each variable
DATABASE_URL
PORT
accessTokenPrivateKey
SERVER_URL
accessTokenExpiresIn
serverName
Run the following command run tests
npm run tests
Run the following command to start the server:
npm run dev
The server will run on http://localhost:3000 by default
You can find additional documentation for this API, including request and response signatures, by visiting https://elements.getpostman.com/redirect?entityId=24812037-d856fcbb-2a6a-408a-99b7-59fd0ee8010b&entityType=collection in your web browser.