Skip to content

Latest commit

 

History

History
84 lines (57 loc) · 2.34 KB

README.md

File metadata and controls

84 lines (57 loc) · 2.34 KB

Teaclub-backend

This is backend project on NodeJs and ExpressJs with NoSQL database

Table of Contents

Introduction

This project is developed using Node.js and Express, utilizing a NoSQL database (MongoDB). It is designed for the famous stall 'Tea Club' to manage their database effectively. The application provides several APIs to facilitate the retrieval and storage of data, ensuring smooth operations for managing orders, inventory, and customer information. This backend service enables 'Tea Club' to streamline their data handling processes and improve overall efficiency.

Features

  • CRUD operations for a Tea-club
  • User authentication

Technologies Used

  • MongoDB: NoSQL database for storing data
  • Express: Web framework for Node.js
  • Node.js: JavaScript runtime environment
  • Mongoose: ODM for MongoDB and Node.js

Getting Started

You can fork this project by downloading zip folder or you can go for cloning the repo

Prerequisites

Installation

  1. Clone the repository:
    git clone https://github.com/Varuni387/Teaclub-backend.git
  2. Navigate to the directory:
    cd Teaclub-backend
  3. Install the dependencies:
     npm install
  4. Create a .env file in the root of your project and add the following:
    MONGO_URI=your-mongodb-uri
    PORT=your-port

Usage

  1. Start the development server
    npm start  

2.The server will run on the specified port. You can access it at http://localhost:9000

API Endpoints

Owner Routes

  • POST /api/OwnerModel: Adds a new owner

Registration Routes

  • POST /api/RegisterModel: Adds a new registration to the application

Login Routes

  • POST /api/LoginModel: Adds a new login to the database
  • GET /api/LoginModel: Fetches all the login information

Item Routes

  • POST /api/ItemsModel: Adds a new item
  • GET /api/items: Fetches all the items from the database
  • DELETE /api/items/:itemName: Deletes an item based on item name
  • PUT /api/items/:itemName: Updates item details based on item name