Skip to content

joaopaulosf/diy-store-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DIY Store API

version express

Overview

DIY Store API is a backend server application designed to support the functionality of the DIY Store web application. It serves as the middleware between the client-side interface and the database, handling requests, managing data, and ensuring smooth interactions between the user interface and the server. The API is built using Node.js, Express.js, and MongoDB with Mongoose for data modeling and management.

Table of Contents

Getting Started

Routes

Routes

Example

fetch('https://diystore-api.onrender.com/products/1')
  .then(res => res.json())
  .then(json => console.log(json))

DIY Store API utilizes the following npm packages:

  • Express: A fast, opinionated, minimalist web framework for Node.js.
  • Mongoose: An elegant MongoDB object modeling tool designed to work in an asynchronous environment.
  • Cors: Middleware for Express.js to enable Cross-Origin Resource Sharing.
  • Dotenv: A zero-dependency module that loads environment variables from a .env file into process.env.
  • Nodemon: A utility that monitors for changes in files and automatically restarts the server.

These packages streamline the development process and ensure efficient server-side functionality for the DIY Store application.