CityBook Backend API is a Node.js and Express application interfacing with MongoDB. It's designed to handle CRUD operations for a city-based social application.
-
CRUD operations for posts.
-
Express server setup.
-
MongoDB database integration with Mongoose.
-
CORS enabled for cross-origin resource sharing.
- Clone the repository.
- Run
npm installto install dependencies. - Set up
.envfile withPORTandMONGODB_URI.
- Start the server with
npm startornode server.js. - Access the API on the defined PORT (default 4000).
POST /CityBook: Create a new post.GET /CityBook: Get all posts.DELETE /CityBook/:id: Delete a post by ID.PUT /CityBook/:id: Update a post by ID.
[State the project license or write 'Not specified'.]