This is the backend for a simple Books App, built using Node.js, Express, and MongoDB.
A simple description of your Books App goes here.
Description: About page added 2 days ago.
Description: Add book functionality added 2 days ago.
Description: Delete book functionality added yesterday.
Description: Home page added yesterday.
Description: List book functionality added yesterday.
Description: Another view of the list book functionality added yesterday.
Description: [Add your description here]
Before you begin, ensure you have the following installed:
- Node.js: Download Node.js
- MongoDB: Install MongoDB
-
Clone the repository:
`git clone https://github.com/dxtaner/books-app-backend.git` `cd books-app-backend`
-
Install dependencies:
`npm install`
-
Set up environment variables:
`PORT=3033 MONGODB_URI=mongodb+srv://your-username:your-password@cluster0.guofsiq.mongodb.net/books-app`
Replace your-username
and your-password
with your MongoDB Atlas credentials.
-
Start the server:
`npm start`
The server will run on http://localhost:3033
or the port specified in the .env
file.
- Test the API:
Visit http://localhost:3033
in your browser or use tools like Postman to test API endpoints.
GET /
: Returns a welcome message.GET /books
: Returns a list of all books.GET /books/:id
: Returns details of a specific book.POST /books
: Creates a new book.PUT /books/:id
: Updates details of a specific book.DELETE /books/:id
: Deletes a specific book.
Feel free to contribute to this project by opening issues or submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.