Skip to content

Ismat-Samadov/Chat_App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chat App

This repository contains the source code for a chat application.

Environment Variables

Before deploying the application, make sure to add the following environment variables to your deployment platform:

  • BUCKETEER_AWS_ACCESS_KEY_ID= (Your AWS Access Key ID)
  • BUCKETEER_AWS_SECRET_ACCESS_KEY= (Your AWS Secret Access Key)
  • BUCKETEER_BUCKET_NAME= (Your AWS S3 Bucket Name)
  • JWT_SECRET= (Your JWT Secret for authentication)
  • MONGO_URL= (URL for your MongoDB database)
  • NODE_ENV= (Environment mode: "production" or "development")
  • PORT=3001 (Port number for the server)
  • VITE_APP_API_URL= (URL for your API endpoint)

AWS S3 Configuration

CORS Configuration:

[
    {
        "AllowedHeaders": [
            "*"
        ],
        "AllowedMethods": [
            "GET",
            "PUT",
            "POST",
            "HEAD",
            "DELETE"
        ],
        "AllowedOrigins": [
            "*"
        ],
        "ExposeHeaders": [],
        "MaxAgeSeconds": 3000
    }
]

Bucket Policy:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "Statement1",
      "Effect": "Allow",
      "Principal": "*",
      "Action": "s3:*",
      "Resource": "arn:aws:s3:::justanotheridiotbucket/*"
    }
  ]
}

Make sure to replace the placeholder values with your actual credentials and configuration details before deploying the application.