Skip to content

Teach-Computing/sample-rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Product Catalog API

This is a simple REST API built with Node.js and SQLite for managing a product catalog. The API supports CRUD operations for products, with each product including details like name, description, price, category, and an image upload feature.

Features

  • Create a new product with name, description, price, category, and image
  • Retrieve all products or a single product by ID
  • Update a product's details and image
  • Delete a product
  • Serve static images to view product images directly

Technologies Used

  • Node.js with Express for the server and routing
  • SQLite for the database
  • Multer for handling image uploads

Getting Started

Prerequisites

  • Node.js and npm installed on your machine

Installation

  1. Clone the repository:
    git clone https://github.com/Teach-Computing/sample-rest-api.git
    cd sample-rest-api
  2. Install dependencies:
    npm install
  3. Install the sqlite3 library:
    npm install sqlite3
    
  4. Create a JavaScript file (e.g., setupDatabase.js) to set up the database:
    node setupDatabase.js
    
    

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published