Skip to content

essmehdi/survey-corps-backend

Repository files navigation

ENSIAS Bridge Survey API

Dashboard Link scren
Dashboard Link scren

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.

Launching the API

If you want to contribute or just try the API, follow the setup below to launch the server.

This API is built using:

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 hosted
  • FRONTEND_URL: URL of the frontend
  • PORT: Port used by the server
  • DATABASE_URL: Connect string to the PostgreSQL database
  • SESSION_SECRET: Express session secret
  • RESEND_API_KEY: Resend API key
  • MAIL_ADDRESS: Sender mail
  • THROTTLE_TTL: Request throttling TTL
  • THROTTLE_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!

About

The backend API for the ENSIAS Bridge Survey project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published