![]() |
![]() |
---|---|
![]() |
![]() |
This repository hosts the ENSIAS Bridge Survey API: A survey management API for the Bridge Club at ENSIAS. For now, it is used mainly for the Survey initiative started by the club to gather information about ENSIAS alumnis and their experience at the school and in the professional world.
If you want to contribute or just try the API, follow the setup below to launch the server.
This API is built using:
- Nest.js for the application
- Prisma as an ORM
- PostgreSQL for the database
Thus, you will need Node.js installed and a PostgreSQL database. We use yarn
as the package manager so you will need it also to continue.
Clone the repository:
git clone https://github.com/essmehdi/survey-corps-backend
Copy the .env.example
file, rename it to .env
and fill it with the same properties as the example file:
API_URL
: URL where the API is hostedFRONTEND_URL
: URL of the frontendPORT
: Port used by the serverDATABASE_URL
: Connect string to the PostgreSQL databaseSESSION_SECRET
: Express session secretRESEND_API_KEY
: Resend API keyMAIL_ADDRESS
: Sender mailTHROTTLE_TTL
: Request throttling TTLTHROTTLE_LIMIT
: Number of requests in the TTL
Install the necessary packages:
yarn install
Now synchronize your database with the Prisma schema.
npx prisma migrate dev
For emails, you will need to setup Resend in the .env
file as mentioned above.
Finally, launch the dev server:
yarn start:dev
And you are good to go!