.env.example 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #-----------------------Backend Config------------------------------#
  2. # Prisma Config
  3. DATABASE_URL=postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch
  4. # Auth Tokens Config
  5. JWT_SECRET="secret1233"
  6. TOKEN_SALT_COMPLEXITY=10
  7. MAGIC_LINK_TOKEN_VALIDITY= 3
  8. # Default validity is 7 days (604800000 ms) in ms
  9. REFRESH_TOKEN_VALIDITY="604800000"
  10. # Default validity is 1 day (86400000 ms) in ms
  11. ACCESS_TOKEN_VALIDITY="86400000"
  12. SESSION_SECRET='add some secret here'
  13. # Reccomended to be true, set to false if you are using http
  14. # Note: Some auth providers may not support http requests
  15. ALLOW_SECURE_COOKIES=true
  16. # Sensitive Data Encryption Key while storing in Database (32 character)
  17. DATA_ENCRYPTION_KEY="data encryption key with 32 char"
  18. # Hoppscotch App Domain Config
  19. REDIRECT_URL="http://localhost:3000"
  20. # Whitelisted origins for the Hoppscotch App.
  21. # This list controls which origins can interact with the app through cross-origin comms.
  22. # - localhost ports (3170, 3000, 3100): app, backend, development servers and services
  23. # - app://localhost-3200-0.1.0: Bundle server origin identifier
  24. # NOTE: `3200` here refers to the bundle server (port 3200) that provides the bundles,
  25. # NOT where the app runs. The app itself uses the `app://` protocol with dynamic
  26. # bundle names like `app://{bundle-name}/`
  27. WHITELISTED_ORIGINS="http://localhost:3170,http://localhost:3000,http://localhost:3100,app://localhost-3200-0.1.0"
  28. VITE_ALLOWED_AUTH_PROVIDERS=GOOGLE,GITHUB,MICROSOFT,EMAIL
  29. # Google Auth Config
  30. GOOGLE_CLIENT_ID="************************************************"
  31. GOOGLE_CLIENT_SECRET="************************************************"
  32. GOOGLE_CALLBACK_URL="http://localhost:3170/v1/auth/google/callback"
  33. GOOGLE_SCOPE="email,profile"
  34. # Github Auth Config
  35. GITHUB_CLIENT_ID="************************************************"
  36. GITHUB_CLIENT_SECRET="************************************************"
  37. GITHUB_CALLBACK_URL="http://localhost:3170/v1/auth/github/callback"
  38. GITHUB_SCOPE="user:email"
  39. # Microsoft Auth Config
  40. MICROSOFT_CLIENT_ID="************************************************"
  41. MICROSOFT_CLIENT_SECRET="************************************************"
  42. MICROSOFT_CALLBACK_URL="http://localhost:3170/v1/auth/microsoft/callback"
  43. MICROSOFT_SCOPE="user.read"
  44. MICROSOFT_TENANT="common"
  45. # Mailer config
  46. MAILER_SMTP_ENABLE="true"
  47. MAILER_USE_CUSTOM_CONFIGS="false"
  48. MAILER_ADDRESS_FROM='"From Name Here" <from@example.com>'
  49. MAILER_SMTP_URL="smtps://user@domain.com:pass@smtp.domain.com" # used if custom mailer configs is false
  50. # The following are used if custom mailer configs is true
  51. MAILER_SMTP_HOST="smtp.domain.com"
  52. MAILER_SMTP_PORT="587"
  53. MAILER_SMTP_SECURE="true"
  54. MAILER_SMTP_USER="user@domain.com"
  55. MAILER_SMTP_PASSWORD="pass"
  56. MAILER_TLS_REJECT_UNAUTHORIZED="true"
  57. # Rate Limit Config
  58. RATE_LIMIT_TTL=60 # In seconds
  59. RATE_LIMIT_MAX=100 # Max requests per IP
  60. #-----------------------Frontend Config------------------------------#
  61. # Base URLs
  62. VITE_BASE_URL=http://localhost:3000
  63. VITE_SHORTCODE_BASE_URL=http://localhost:3000
  64. VITE_ADMIN_URL=http://localhost:3100
  65. # Backend URLs
  66. VITE_BACKEND_GQL_URL=http://localhost:3170/graphql
  67. VITE_BACKEND_WS_URL=ws://localhost:3170/graphql
  68. VITE_BACKEND_API_URL=http://localhost:3170/v1
  69. # Terms Of Service And Privacy Policy Links (Optional)
  70. VITE_APP_TOS_LINK=https://docs.hoppscotch.io/support/terms
  71. VITE_APP_PRIVACY_POLICY_LINK=https://docs.hoppscotch.io/support/privacy
  72. # Set to `true` for subpath based access
  73. ENABLE_SUBPATH_BASED_ACCESS=false