Skip to content

ArkadyKoretsky/university-enrollment

Repository files navigation

Universities and Students Enrolling API

This is a small REST API implementing some queries about students data and universities data.
The API implemented in NestJS with mongoose.

Please read the whole README before running the app.

Installation

Clone this repo and run:

$ npm install

Running the app

To run the server, run one of these commands:

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

The server will run locally on port 3000.

To check the requests (with Postman for example) the global URI should be this:
http://localhost:3000/api

Concatenate to this URI the requested endpoints.

GET Methods

No need to pass anything in body.

The IDs both university ID and student ID represented as natural integer numbers (starting from 1).

Each endpoint that includes {universityId} or {studentId} replace with actual number at the URI.

POST Methods

Some of the POST methods require passing json object at the body.

For university creation you must pass the fields: name, maxNumberOfStudents and minGpa.

For student creation you must pass the fields: name and array of grades. Each grade is a json object that has the fields: courseName and grade.

For both of the cases the document won't be created if you will not pass the mentioned fields.

Data Base

The data base is MongoDB and stored in cloud through the Atlas service.
No need to install Mongo locally.
You can install only the Compass software if you wish to see the whole data base.

You might notice that each document contains more fields than requested, don't worry about not passing them at the body.
These fields created at the server side and serves mostly student enrolling.
The _id field generated by regular counting and serves as the student\university ID.

About

This is a small REST API implementing some queries about students data and universities data. The API implemented in NestJS with mongoose.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors