AbdullahNM / favourite-teacher-list

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contact

About The Project

Backend API that allows students to login and add or remove teachers from their favourite lists

(back to top)

Built With

  • NodeJs
  • ExpressJs
  • MongoDB
  • Mongoose

(back to top)

Getting Started

Prerequisites

  • npm
    npm install npm@latest -g

Installation

  1. Clone the repo

    git clone https://github.com/AbdullahNM/favourite-teacher-list
  2. Install NPM packages

    npm install
  3. Connect to MongoDB Database and get your Database URL

    For help refer : Help

  4. Enter your DATABASE_URL and JWT_SECRET_KEY in .env

    DATABASE_URL = 'Enter Your URL'
    JWT_SECRET_KEY = 'Enter Your secret Key'
  5. Start The Server (localhost:3000)

npm start

(back to top)

Usage

  • Learner Schema
{
    name: String,
    age: Number,
    favourite: Array,
    email: Email,
    password: String(Encrypted)
}
  • Teacher Schema
{
    name: String,
    age: Number,
    subject: String,
    count:  Number
}
  • Add student to database
localhost:3000/learner/add
  • Get All students
localhost:3000/learner/getAll
  • Get Student By ID
localhost:3000/learner/getOne/:id
  • Add teacher to favourite list
localhost:3000/learner/addfavourite
  • Remove teacher from favourite list
localhost:3000/learner/removefavourite
  • Login Student
localhost:3000/learner/login
  • Add teachers to Database
localhost:3000/teacher/add
  • Get Most Liked Teacher
localhost:3000/teacher/getMostFav
  • Get All Teachers
localhost:3000/teacher/getAll
  • Get Teacher By ID
localhost:3000/teacher/getOne/:id

(back to top)

Contact

Project Link: https://github.com/AbdullahNM/favourite-teacher-list

(back to top)

About


Languages

Language:JavaScript 97.1%Language:HTML 2.9%