Test the Initial Express Server
Start the application:
npm run dev
Open your browser or API client and send a GET request:
GET http://localhost:3000/health
Expected response:
{
"success": true,
"message": "API is running"
}
If you receive the expected response, the Express application is running.
You should also see a successful MongoDB connection message in the terminal.
Start the Application
npm run devStarts the backend using the development script.
Key Takeaways
Verify the server using the health endpoint.
Confirm that MongoDB connects successfully.
Check terminal logs when startup fails.