GithubHelp home page GithubHelp logo

nodegitlog's Introduction

NodeGitLog

Nodejs server API that show git log from one folder

Download project

git clone https://github.com/maximilianoh/NodeGitLog.git
yarn install
yarn start

Config

In configServerGit.json
      {
        "path": "path/local/repository/.git",
        "notCheckUpdate": true, 
        "branch": "master" 
      }
notCheckUpdate = true if it do git pull in all petitions, 
                false you can update manually with url: /updateRepository
branch do git pull origin "branch"

In index.js
  You can change the port

Example

  git clone https://github.com/octocat/Spoon-Knife.git in /home/user/example/

  set /home/user/example/Spoon-Knife/.git in  configServerGit.json


Update Repository (GET)
http://localhost:3001/updateRepository


Show commits (POST)
http://localhost:3001/commits
        {"cantHistorys":""} or {}
        {"cantHistorys":"5"} or {"cantHistorys":5}
Show commits by file (POST)
http://localhost:3001/commitsFile
        {"cantHistorys":"", "file":""} or {}
        {"cantHistorys":"", "file":"readme"} 
  check if readme has changed in last "cantHistorys" commits

Show commits by author (POST)
http://localhost:3001/commitsAuthor
     {"cantHistorys":"", "author":""} or {}
     {"cantHistorys":"1", "author":"oct"} 
  check if "author" has commited in last "cantHistorys" commits

Format Return

200:
    [
      {
        "commit": "f439fc5710cd87a4025247e8f75901cdadf5333d",
        "author": "The Octocat <[email protected]>",
        "date": "Wed Sep 3 14:22:02 2014 -0700",
        "message": "Update README.md",
        "files": [
          "README.md"
        ]
      }
    ]
404:
     {
       "error": "Something wrong, please check your configServerGit.json or if your project has at least one commit"
     }

nodegitlog's People

Contributors

maximilianoh avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.