Skip to content

This is the nodejs server for the git-init-FOSS event. It is a simple backend that runs a cron job for fetching and updating scores of students every 1 hour and returns that data to a single endpoint.

Notifications You must be signed in to change notification settings

kunaljain0212/git-init-FOSS-API

Repository files navigation

git-init-FOSS-API

Github issues Github forks Github stars

This is the backend repo of git-INIT-FOSS-Client

Screenshot Screenshot

Project Description

This project is made to introduce students to the world of open source. Here, the users can navigate to find the project most suitable to them and then contribute to it.

Features

1. Frontend (Frontend Repositry)

1. Navigation

You can navigate to projects and leaderboard from here.

2. Search Bar

  • Here we can directly search for project or user using by Contributers Name,Maintainers Name,UserName,Project name etc.

3. Projects Card

In this all the information about the project is given.

4. LeaderBoard Tile

Here all the information of contributors is given

  • Contributors Name
  • Github UserName
  • Contributors Roll Number
  • Score

5.Statistics

Here we have the information

  • Total number of Pull Request
  • Total number of Active Contributers
  • Number of Hard, Medium, Easy

2. Backend

  • All the data related to the project, like student details, student scores, student score card and the projects are stored in public folder.
  • The src fetches the student details and then calculates the score of students.
  • The updaterDB.js updates the score of students. If you want to update the score manually you'll have to run (node src\updaterDB.js)
  • This server has a cron job built-in which runs every 1 hour and updates the scores of participants in score.json file, which is then served using a single endpoint to the frontend. If you want to update the score automatically after every one hour you'll have to run (crontab script.cron).
  • You can also edit the time, after which you want to update the scores in the script.cron file.
  • The cron command-line utility, also known as cron job is a job scheduler on Unix-like operating systems. Users who set up and maintain software environments use cron to schedule jobs to run periodically at fixed times, dates, or intervals.
  • You can learn more about cron from here (Cron).

Technologies and Packages Used

  1. Node
  2. Express
  3. Cron
  4. Node Fetch

Local Setup

Get Started

  1. Fork the repositry.
  2. Clone the repositry (git clone URL).
  3. Open the folder in which you cloned the repositry.
  4. Run(npm install).
  5. Run (npm run dev).
  6. This will start your server locally.

Building and running in production mode

You can run the newly built app with npm run start.

Contributors


Connect with us


About

This is the nodejs server for the git-init-FOSS event. It is a simple backend that runs a cron job for fetching and updating scores of students every 1 hour and returns that data to a single endpoint.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published