Skip to content

Latest commit

Β 

History

History
77 lines (53 loc) Β· 1.22 KB

File metadata and controls

77 lines (53 loc) Β· 1.22 KB

πŸš€ Quick Start - Secured Backend

⚑ Get Running in 3 Steps

1. Install New Dependencies

npm install

2. Update .env File

Make sure your .env has these minimum requirements:

MONGO_URI=mongodb://localhost:27017/deenbridge
JWT_SECRET=deenbridge-super-secret-key-minimum-32-characters-long
NODE_ENV=development
PORT=5000

3. Start Server

npm run dev

You should see:

βœ… Environment variables validated successfully
βœ…πŸŒΏ MongoDB connected successfully
πŸš€πŸ•Œ DeenBridge API running on port 5000

πŸ“ Logs Directory

Logs will be auto-created in /logs:

logs/
β”œβ”€β”€ error-2025-10-24.log
β”œβ”€β”€ combined-2025-10-24.log
└── http-2025-10-24.log

πŸ§ͺ Test It Works

# Health check
curl http://localhost:5000/ping

# Try login (will be rate limited after 5 attempts)
curl -X POST http://localhost:5000/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"test@test.com","password":"test"}'

πŸ” Monitor Logs

# Watch all logs
tail -f logs/combined-*.log

# Watch errors only
tail -f logs/error-*.log

That's it! Your secure backend is running! ✨