Skip to content

Dor3cas/JS-Exam-Practical

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bookstore API

Overview

A simple REST API built with Node.js, Express, and MongoDB to manage books.

Features

  • Add a book
  • Get all books
  • Get book by ID
  • Update a book
  • Delete a book

Tech Stack

  • Node.js
  • Express.js
  • MongoDB
  • Mongoose
  • Dotenv

Project Structure

config/     database connection
models/     Book schema
routes/     API routes
server.js   entry point
.env        environment variables

Setup

  1. Install dependencies
npm install
  1. Create .env file
PORT=3000
MONGO_URI=mongodb://127.0.0.1:27017/bookstore
  1. Run server
node server.js

API Routes

  • POST /api/books
  • GET /api/books
  • GET /api/books/:id
  • PUT /api/books/:id
  • DELETE /api/books/:id

About

This is a bookstore API that handles CRUD operations

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors