Welcome to the Bookstore Backend API! This API provides endpoints for managing books and authors in a bookstore.
-
Books
GET /api/books
: Get all booksGET /api/books/:id
: Get a book by IDPOST /api/books
: Add a new bookPUT /api/books/:id
: Update a book by IDDELETE /api/books/:id
: Delete a book by ID
-
Authors
GET /api/authors
: Get all authorsGET /api/authors/:id
: Get an author by IDPOST /api/authors
: Add a new authorPUT /api/authors/:id
: Update an author by IDDELETE /api/authors/:id
: Delete an author by ID
- config/: Contains configuration files.
- controllers/: Contains controller files for handling business logic.
- models/: Contains data models for books and authors.
- routes/: Contains route files defining API endpoints.
- .env: Environment variables file (not included in repository).
- .gitignore: Git ignore file.
- package.json: npm package configuration.
- server.js: Main server file.
- README.md: Project documentation.
- Clone the repository.
- Install dependencies using
npm install
. - Set up environment variables in a
.env
file (not included in repository). - Start the server using
npm start
.
- Version Control: This project must be version-controlled using Git.
- GitHub Repository: Create a new repository on GitHub for this project.
- Commits: Each feature addition or significant change should be committed separately.
- Commit Messages: Commit messages must be clear and descriptive, indicating the purpose of each change.
- Push to GitHub: Push the changes to the GitHub repository regularly.
- Create a GitHub repository for this project.
- Initialize the project as a Git repository locally.
- Commit each feature addition or significant change separately with clear commit messages.
- Push the commits to the GitHub repository.
- Provide the GitHub repository link along with your submission.