Next.js API with Swagger & Bearer Token
Welcome to your API!
Quick Start
- 📚 View API Documentation (Swagger)
- Bearer Token:
(Check your .env file)
Available Endpoints
GET /api/health- Health check (requires bearer token)GET /api/users- Get all users (requires bearer token)
How to Use
- Go to /docs to see the Swagger UI
- Click the "Authorize" button in the top right
- Enter your bearer token
- Try out the endpoints!
Testing with cURL
curl -H "Authorization: Bearer <YOUR_TOKEN>" \ http://localhost:3000/api/health