Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

abour .env file creation #2

Closed
mr-santhu18 opened this issue Sep 12, 2024 · 2 comments
Closed

abour .env file creation #2

mr-santhu18 opened this issue Sep 12, 2024 · 2 comments

Comments

@mr-santhu18
Copy link

mr-santhu18 commented Sep 12, 2024

hello sir...

I'm Gnanesh N C and studying MCA final year.
i'm doing MERN project for my academics same as like your project please help me out for creation of .env file

I am getting mongoserver error and also bad authentication please resolve this error and help to run this project and modifications.

thank your

@piyushraj2340
Copy link
Owner

  • /Backend/.env template

    • SECRET_KEY=your-secret-key
    • COLLECTION_NAME=your-collection-name
    • COLLECTION_PASSWORD=your-collection-password
    • FRONTEND_URL=https://your-frontend-url.com
    • BACKEND_URL=https://your-backend-url.com
    • CLOUDINARY_NAME=your-cloudinary-name
    • CLOUDINARY_API_KEY=your-cloudinary-api-key
    • CLOUDINARY_API_SECRET=your-cloudinary-api-secret
    • STRIPE_PUBLISHABLE_KEY=your-stripe-publishable-key
    • STRIPE_SECRET_KEY=your-stripe-secret-key
    • REDIS_VERCEL_KV_DB=your-vercel-redis-db
    • KV_URL=your-kv-url
    • KV_REST_API_URL=your-kv-rest-api-url
    • KV_REST_API_TOKEN=your-kv-rest-api-token
    • KV_REST_API_READ_ONLY_TOKEN=your-kv-read-only-token
    • SMTP_HOST=your-smtp-host
    • SMTP_PORT=your-smtp-port
    • SMTP_GOOGLE_APP_PASSWORD=your-google-app-password
    • SMTP_GOOGLE_MAIL_ADDRESS=your-google-mail-address
  • /Frontend/.env template

To get the API keys for Vercel KV as described in the Vercel KV Quickstart documentation, here are the steps to follow:

1. Create a Vercel KV Database:

  • Go to your Vercel dashboard.
  • Navigate to Storage > KV.
  • Click on Create a KV Database and provide a name for your database.

2. Access the KV Database:

  • After creating the KV database, go to the KV section in your Vercel project.
  • Select the KV database you just created to view its details.

3. Get the API Keys and Tokens:

  • KV_REST_API_URL: This URL is used to make requests to the KV API.
    • You can find this in the details section of your created KV database.
  • KV_REST_API_TOKEN: This is the token used to authenticate your requests.
    • You can generate or view the existing API token under the API Tokens section.
  • KV_REST_API_READ_ONLY_TOKEN: This token is used for read-only operations.
    • You can also find or generate this in the API Tokens section of the KV dashboard.
  • Add the API Keys to Your .env File:
    • Once you have your KV_REST_API_URL, KV_REST_API_TOKEN, and KV_REST_API_READ_ONLY_TOKEN, add them to your .env file like this:

Reference for Vercel KV API Key Setup

For a detailed walkthrough on setting up the Vercel KV database and obtaining the API keys, please refer to the following video:
Getting Started with Vercel KV

Reference for Cloudinary Setup

For a detailed walkthrough on setting up Cloudinary and obtaining the necessary API keys, please refer to the following video:
Getting Started with Cloudinary

SMTP Configuration for Development and Production

  • SMTP Configuration
    • SMTP_HOST=your-smtp-host
  • Port for development
    • SMTP_PORT=587 # Typically used for TLS
  • Port for production
    • SMTP_PROD_PORT=465 # Typically used for SSL
  • SMTP_GOOGLE_APP_PASSWORD=your-google-app-password
  • SMTP_GOOGLE_MAIL_ADDRESS=your-google-mail-address

Reference for SMTP Setup

For a detailed walkthrough on setting up SMTP and configuring the necessary settings, please refer to the following video:
Getting Started with SMTP

Reference for Stripe Setup

For a detailed walkthrough on setting up Stripe and obtaining the necessary API keys, please refer to the following video:
Getting Started with Stripe

Reference for MongoDB Setup

For a detailed walkthrough on setting up MongoDB and configuring your database, please refer to the following video:
Getting Started with MongoDB

piyushraj2340 added a commit that referenced this issue Oct 15, 2024
Update README.md: Added reference to Issue #2 regarding .env template inquiry for better user guidance
@mr-santhu18
Copy link
Author

mr-santhu18 commented Nov 19, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants