This is the backend service for the Coffee Shop Finder App. It provides RESTful APIs to manage and retrieve coffee shop data, including details, locations, ratings, and images. The backend is built with Node.js, uses MongoDB for data storage, and can be deployed on AWS.
- 🌐 RESTful APIs to manage coffee shop data
- 📜 Endpoints for accessing product listings per coffee shop
- 🔍 Advanced search and sorting powered by MongoDB Atlas Search
- 💾 MongoDB for data storage
- 🔓 CORS enabled for cross-origin requests
- Backend: Node.js, Express.js
- Database: MongoDB
- Deployment: AWS
- Node.js and npm installed
- MongoDB Atlas account or a local MongoDB instance
-
Clone the repository:
git clone https://github.com//Devojha408/coffee-shop-finder-api.git cd coffee-shop-finder-api
-
Install dependencies:
npm install
-
Set up environment variables:
Create a
.env
file in the root directory and add the following variables:PORT=5000 MONGO_URI=your_mongodb_connection_string
-
Start the server:
npm start
-
API Endpoints:
GET /api/coffeeshops
: Retrieve all coffee shops (supports advanced query and sorting powered by MongoDB Atlas Search)GET /api/coffeeshops/:id
: Retrieve a single coffee shop by IDPOST /api/coffeeshops
: Create a new coffee shopPUT /api/coffeeshops/:id
: Update a coffee shop by IDDELETE /api/coffeeshops/:id
: Delete a coffee shop by ID
src/
config/
: Database configurationcontrollers/
: API controllersmodels/
: Mongoose modelsroutes/
: API routesindex.js
: Main server file
The app uses dummy data to simulate API calls. You can replace this with actual data as needed.
To deploy the application on AWS:
-
Build the application:
npm run build
-
Deploy the build folder to your AWS EC2 instance or any other hosting service.
Contributions are welcome! Please submit a pull request or create an issue to discuss any changes.
This project is licensed under the MIT License.
- Node.js
- Express.js
- MongoDB
- AWS
Backend Repo URL: https://github.com/Devojha408/coffee-shop-finder-gui
You're now ready to start using the Coffee Shop Finder app! ☕🚀