Skip to content

yvs2701/dyte-api-VITHIRING-phase1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hackerrank

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

About The Project

Product

An api to simulate FFCS course registration offered in Vellore Institute of Technology, as a part of Dyte hiring process. This api follows guidelines and instructions given at: Google Docs Link.
The testing tool can be found here: Dyte python script.

(back to top)

Built With

Postgres Sequelize Express.js Nodemon Visual Studio Code

(back to top)

Getting Started

To get the project up and running follow these simple steps:

Installation

  1. Clone the repo

    git clone https://github.com/yvs2701/dyte-api-VITHIRING-phase1.git

    You can instead download the coedbase as an archive from the download code button.

  2. Install dependencies

    npm install

(back to top)

Usage

  • Create a .env file and fill in the following secrets:

    • PORT_NO // for express server
    • DB_PORT
    • DB_HOST
    • DB_USER
    • DB_PASSWORD
    • DB_NAME
  • To initialize or reset your database in Postgres, run:

    npm run init-db
  • To run the server in development mode run the following command:

    npm run start
  • The server provides the following routes:

    • /admin/faculty (POST): creates a new faculty resource.
    • /admin/slot (POST): creates a new slot resource along with timings.
    • /admin/course (POST): creates a new course resource which references slots and faculties.
    • /admin/student (POST): creates a student resource if no such resource exists. Otherwise returns same student resource everytime.
    • /faculty/:id (GET): returns a faculty resource.
    • /course/:id (GET): returns a course resource.
    • /register (POST): associates a student resource with course resource (many-to-many).
    • timetable (GET): fetches all the registered courses and their slots for the given student.

(back to top)

About

An api to simulate FFCS course registration offered in Vellore Institute of Technology, as a part of Dyte hiring process.

Topics

Resources

Stars

Watchers

Forks