From 9fe4ba37acf772a711672bb782b1aafe2e6f1577 Mon Sep 17 00:00:00 2001 From: Jai Marothiya <104977565+Jai-Marothiya@users.noreply.github.com> Date: Sun, 29 Sep 2024 11:43:04 +0530 Subject: [PATCH] Update CONTRIBUTING.md --- CONTRIBUTING.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 01ae5b4..de93737 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -61,6 +61,36 @@ To set up the project on your local machine, follow these steps: npm install ``` +## Local Environment Setup +Both the client and server folders require a .env file for environment-specific configurations. Below are the instructions for setting up these files. + +### Server Folder (.env) +You must create a .env file in the server folder to store environment variables. Use the following template to set up your .env file: + ```bash + # Server Configuration + PORT=5000 + + # PostgreSQL Database + DATABASE_URL=postgres://postgres:${your_pg_password}@127.0.0.1/algohub + PG_HOST="127.0.0.1" + PG_USER="postgres" + PG_PASSWORD= # Add your PostgreSQL password here + PG_DATABASE=algohub + + # Google OAuth Credentials + CLIENT_ID=1088957184358-6vg9gfngftpc85443sb1e55v4m1l4cb6.apps.googleusercontent.com + + # JWT Access Key + REFRESH_SECRET_KEY=f74b5b600a2b67c4f0ed42d65bf7a14dd394fd527bb65eaf5730ac2098e6d7e2dc51e278f0235ad9f8a1cb4b6e9efddc6e348b92d6c6e771aca0ef3b4e6fcab3 + ``` + +### Client Folder (.env) +You must create a .env file in the client folder to store environment variables. Use the following template to set up your .env file: + ```bash + # Google auth Ceredentials + REACT_APP_CLIENT_ID=1088957184358-6vg9gfngftpc85443sb1e55v4m1l4cb6.apps.googleusercontent.com + ``` + ## Run the project 1. **Start the backend server**: