Skip to content

dazes97/git-commit-history-backend

Repository files navigation

Backend for Git Commit History

The Git Commit History Backend is a server-side application that complements the Git Commit History project. It's responsible for fetching and serving commit data from selected repositories and branches.

Project Overview

  • Technology Stack: This backend is built using NestJS, a powerful Node.js framework. It leverages the Class Validator library for request validation, integrates Swagger for API documentation, and uses Axios and RxJS for efficient HTTP requests and asynchronous operations.

  • Fetching Commits: The primary purpose of this backend is to provide a RESTful API that allows users to retrieve commit history from specific repositories and branches. Users can select a repository (either 'git-commit-history-frontend' or 'git-commit-history-backend') and a branch (either 'master' or 'develop') to retrieve relevant commit information.

How to Use

  1. Clone the Repository: To set up the backend, clone this repository to your local development environment.

  2. Installation: By default the values are configured as described below:

  1. Run the following commands
  • run docker build -t [example-name] . don't forget to replace "[]" with the name you choose
  • run docker run --name=[example-name] -p 5000:5000 [example-name]
  • enjoy!
  1. API Documentation: The backend includes Swagger documentation, which can be accessed by navigating to http://localhost:5000/api after starting the server. It provides detailed information about the available endpoints and how to use them (make sure to set docker variable NODE_ENV to development).

  2. Fetching Commits: You can use the API endpoint /commits to fetch commits for a selected repository and branch.

Ensure that the repository name is one of the specified options ('git-commit-history-frontend' or 'git-commit-history-backend') and that the branch name is either 'master' or 'develop'.

Notes

CORS are enable by default only receive request from http://localhost:3000

About

Backend technical test for FulltimeForce

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published