Hamzi-SE/nelami

Backend Env File

Closed this issue · 1 comments

Need more info on setting up the backend config env file

Thank you for reaching out with your question. To set up the config.env file for the backend, please follow these steps:

  1. Navigate to the Backend Config Folder:

    • Go to the backend/config directory in your cloned repository.
  2. Create the config.env File:

    • Inside the config folder, create a new file named config.env.
  3. Add the Necessary Environment Variables:

    • Open the config.env file and add the following variables with your specific values:
Variable Sample Value
PORT 8000
DB_URI mongodb+srv://<username>:<password>@cluster0.mongodb.net/nelami?retryWrites=true&w=majority
FRONTEND_URL http://localhost:3000
JWT_SECRET your_jwt_secret
JWT_EXPIRE 7d
COOKIE_EXPIRE 7
SMTP_SERVICE gmail
SMTP_MAIL youremail@gmail.com
SMTP_PASSWORD yourpassword
SMTP_HOST smtp.gmail.com
SMTP_PORT 465
CLOUDINARY_NAME your_cloudinary_name
CLOUDINARY_API_KEY your_cloudinary_api_key
CLOUDINARY_API_SECRET your_cloudinary_api_secret
STRIPE_API_KEY your_stripe_api_key
STRIPE_SECRET_KEY your_stripe_secret_key

Make sure to replace the placeholder values with your actual credentials and configuration settings.

If you have any further questions or need additional assistance, feel free to ask!

Best regards,
Hamza