src/controllers/: Handles API logicsrc/models/: Mongoose modelssrc/routes/: API route definitionssrc/config/: Database and configuration setup
- Create a
.envfile and add your MongoDB URI:MONGO_URI=your_connection_string - Install dependencies:
npm install - Start the server:
npm start
GET /api/users: Retrieve all usersPOST /api/users: Create a new user
- Node.js
- Express.js
- MongoDB (with Mongoose)
- dotenv for environment variable management
This project is licensed under the MIT License.