Welcome to the Tails & Tables server-side repository! This server provides the API for the Tails & Tables mobile application, supporting user authentication, profile management, place discovery, reviews, and favorites functionality.
- User Management: Register, login, and manage user profiles.
- Place Data: Fetch and provide data for pet-friendly places.
- Reviews: Handle user reviews for places.
- Favorites: Manage user favorite places.
- MongoDB: For the database.
- Express.js: For the server framework.
- Node.js: For the server environment.
-
Clone the repository:
git clone https://github.com/yourusername/tails-and-tables-server.git cd tails-and-tables-server
-
Install dependencies:
npm install
-
Environment variables: Create a
.env
file in the root directory and add the following:PORT=5000 MONGODB_URI=your_mongodb_uri JWT_SECRET=your_jwt_secret
-
Start the server:
npm start
tails-and-tables-server/ ├── controllers/ # Route handlers ├── models/ # Mongoose models ├── routes/ # Express routes ├── middleware/ # Middleware functions ├── utils/ # Utility functions ├── config/ # Configuration files ├── server.js # Entry point of the server ├── package.json # Dependencies and scripts └── README.md # Project documentation
markdown Copiar código
-
Authentication:
POST /api/auth/register
: Register a new user.POST /api/auth/login
: Login a user.
-
User Profile:
GET /api/user/profile
: Get user profile.PUT /api/user/profile
: Update user profile.
-
Places:
GET /api/places
: Get nearby pet-friendly places.
-
Reviews:
POST /api/reviews
: Submit a review.GET /api/reviews/:placeId
: Get reviews for a place.
-
Favorites:
POST /api/favorites
: Add a place to favorites.GET /api/favorites
: Get user's favorite places.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.