Skip to content

A referral API built with Typescript, Fastify and PostgreSQL

Notifications You must be signed in to change notification settings

dipo0x/Typescript-Referral-System

Repository files navigation

Typescript-Referral-System

Introduction

This is a RESTful API built using Typescript, Fastify, MySQL and Prisma ORM. This API helps users to refer and get referred.

Setup

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

Running Server

Locally

Run the following command to start the server:

npm run dev

The server will run on http://localhost:3000 by default


Conclusion

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.

About

A referral API built with Typescript, Fastify and PostgreSQL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published