Git Product home page Git Product logo

stage-two's Introduction

REST API with Basic CRUD Operations

This is a simple REST API built with Node.js and SQLite3, capable of performing CRUD (Create, Read, Update, Delete) operations on a "User" resource.

Table of Contents

Installation

  1. Clone the repository:

    git clone <repository_url>
    
  2. Navigate to the project directory:

    cd <project_directory>
    
  3. Install the required dependencies:

    npm install
    

Usage

To run the API locally, follow these steps:

  1. Start the server:

    npm start
    
  2. The API will be available at http://localhost:3000.

API Endpoints

  • Create a new person:

    • Endpoint: POST /api
    • Request body:
      {
        "name": "John Doe"
      }
      
    • Response (example):
      {
        "id": 1,
        "name": "John Doe"
      }
      
  • Fetch details of a person by ID:

    • Endpoint: GET /api/:id
    • Response (example):
      {
        "id": 1,
        "name": "John Doe"
      }
      
  • Update details of an existing person by ID:

    • Endpoint: PUT /api/:id
    • Request body:
      {
        "name": "Jane Doe"
      }
      
    • Response (example):
      {
        "message": "User updated successfully"
      }
      
  • Remove a user by ID:

    • Endpoint: DELETE /api/:id
    • Response (example):
      {
        "message": "User removed successfully"
      }
      

UML Diagram

Alt text

Documentation

For more detailed information on how to use the API, request and response formats, and examples, please refer to the DOCUMENTATION.md file in the repository.

Hosting

You can deploy this API to a hosting service like Heroku. Follow their documentation to set up the deployment and make your API accessible online.

stage-two's People

Contributors

etynosa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.