Skip to content

Latest commit

 

History

History
56 lines (35 loc) · 1.07 KB

File metadata and controls

56 lines (35 loc) · 1.07 KB

Database-Free-REST-API-With-NodeJS-and-ExpressJs

This is a simple RESTful API built with Node.js and Express.js that does not require a database connection. It provides basic CRUD (Create, Read, Update, Delete) operations for managing data.

Features

  • Create: Add new data
  • Read: Retrieve existing data
  • Update: Modify existing data
  • Delete: Remove existing data

Technologies Used

  • Node.js
  • Express.js

Prerequisites

Before running this application, ensure that you have Node.js installed on your machine.

Installation

  1. Clone the repository to your local machine:

  2. Navigate to the project directory using command cd <repository_name>

  3. Install dependencies: npm install

Usage

  1. Start the server: npm start

  2. Access the API endpoints using your preferred HTTP client. Ex: Postman

API Endpoints

GET /api/users

  • Retrieves all users

GET /api/users/:id

  • Retrieves a user by ID

POST /api/users

  • Adds a new user

DELETE /api/users/:id

  • Deletes a user by ID

PATCH /api/users/:id

  • Updates a user by ID

Thank You ❤️!