Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
69 lines (61 loc) · 2.54 KB
/
Copy path.env.example
File metadata and controls
69 lines (61 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# ========================================
# Distributed File System — Environment Variables
# ========================================
# Copy this file to .env and fill in your values:
# copy .env.example .env (Windows)
# cp .env.example .env (Linux/Mac)
#
# NEVER commit the .env file!
# ========================================
# --- Server ---
PORT=3000
NODE_ENV=development
# Reverse-proxy hops in front of the app (Railway/Render/Fly = 1)
TRUST_PROXY=1
# --- Database ---
DB_HOST=localhost
DB_PORT=3306
DB_USER=root
DB_PASSWORD=your_password_here
DB_NAME=distributed_fs
# --- Authentication (REQUIRED in production) ---
# Generate: node -e "console.log(require('crypto').randomBytes(64).toString('hex'))"
JWT_SECRET=your_super_secret_key_change_this_in_production
JWT_EXPIRES_IN=24h
# --- Encryption at rest (REQUIRED in production) ---
# 32 random bytes as 64 hex characters. Every stored chunk is encrypted with it.
# Generate: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
# BACK IT UP somewhere safe: if this key is lost, encrypted files are gone for good.
# Never change it once files are stored (key rotation isn't supported yet).
ENCRYPTION_KEY=
# Existing plaintext chunks are encrypted in the background on start-up.
# Set to false to skip and run `npm run encrypt:existing` yourself.
ENCRYPT_EXISTING_ON_BOOT=true
# --- Frontend / CORS ---
# Public URL of the frontend (reset-password links; always allowed by CORS)
FRONTEND_URL=http://localhost:5173
# Extra allowed browser origins, comma-separated
CORS_ORIGIN=
# Optional regex for preview deployments, e.g.
# ^https://distributed-file-system-[a-z0-9]+-nottastro\.vercel\.app$
CORS_ORIGIN_REGEX=
# --- Google sign-in ---
# https://console.cloud.google.com/apis/credentials → OAuth client (Web)
# Add your frontend URL under "Authorized JavaScript origins".
# The frontend reads this ID from the API — no need to set it there too.
GOOGLE_CLIENT_ID=your_google_client_id_here
GOOGLE_CLIENT_SECRET=your_google_client_secret_here
# --- Email (login codes + password reset) ---
# Preferred: Resend HTTPS API (works where SMTP ports are blocked, e.g.
# Railway below the Pro plan). https://resend.com → API Keys
RESEND_API_KEY=
# Sender for both Resend and SMTP (must be a domain verified with your provider)
SMTP_FROM="upLoader <noreply@uploader.app>"
# Fallback: SMTP (Gmail needs an App Password: https://myaccount.google.com/apppasswords)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=
SMTP_PASS=
# --- Limits ---
# STORAGE_QUOTA_BYTES=10737418240
# MAX_UPLOAD_BYTES=104857600