Node.js + Express + MongoDB backend for the Coinbase Clone assignment.
npm install
cp .env.example .env
# Fill in your MongoDB URI and JWT secret
npm run dev| Method | Route | Auth | Description |
|---|---|---|---|
| GET/POST | /register |
No | Register new user |
| GET/POST | /login |
No | Login user |
| POST | /logout |
No | Logout user |
| GET | /profile |
Yes (JWT) | Get user profile |
| GET | /crypto |
No | Get all cryptocurrencies |
| GET | /crypto/gainers |
No | Get top gainers |
| GET | /crypto/new |
No | Get newest listings |
| POST | /crypto |
No | Add new cryptocurrency |
- Push this folder to GitHub
- Go to render.com → New → Web Service
- Connect your repo
- Set environment variables:
MONGODB_URI= your MongoDB Atlas connection stringJWT_SECRET= a long random stringFRONTEND_URL= your Netlify frontend URLNODE_ENV= production
- Build command:
npm install - Start command:
npm start