This is a simple REST service for the management of students at Backend Academy school. It was built with NodeJS, ExpressJS, mongoose and mongoDB. User can CRUD student's data(Bio data and subjects detail) as well as query simple statistical data relating to students in the school..
The API documentation above can be accessed by visiting http://{host}:{PORT}/{API_PREFIX}/docs
Example: http://localhost:5000/api/v1/api-docs/#/
A user can
- add a student
- view a student
- view all students
- update a student
- delete a student
- view all students in a class
- view all students in a class that offer a particular subject
- view all (male/female)students in a class that offer a particular subject
- view all subjects
- add a subject for a student
- update a subject for a student
- delete a subject for a student
Install MongoDB
Clone the repository to your local machine
$ git clone https://github.com/charlyeneh/Backend-Academy-api.git
Navigate into the project directory
$ cd inventory-management-system-api
Set up environment variables
$ cp env.sample.env
# [NOTE]: Make sure to provide the necessary environment variables inside the .env file
Fill in the environment variables. NB:
'NODE_ENV', 'PORT', 'API_PREFIX'
are REQUIRED
Install the dependencies
$ npm install
Run the seed.js file to generate mock data of the student's records
$ node seed.js
Start the server. Make sure your mongoDB deamon and redis client are running
$ npm start
Then open your browser and visit
http://127.0.0.1:3000/api/v1/status
. You should see{"status":"OK"}
. You can also use postman to issue theGET
request to the status endpoint.
You can access the API documentation by visiting
http://127.0.0.1:3000/api/v1/docs
NB: 3000 is the default port when you don't supply a port in the .env; 127.0.0.1 is the default host as well.
👤 CHARLES CHUKWUNWEIKE ENEH
- Github: @charlyeneh
- Linkedin: Charles Chukwunweike Eneh
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
- Fork it (https://github.com/charlyeneh/Backend-Academy-api/fork)
- Create your working branch (git checkout -b [choose-a-name])
- Commit your changes (git commit -am 'what this commit will fix/add/improve')
- Push to the branch (git push origin [chosen-name])
- Create a new Pull Request
Give a ⭐️ if you like this project!