Skip to content
This repository was archived by the owner on Jan 10, 2024. It is now read-only.
This repository was archived by the owner on Jan 10, 2024. It is now read-only.

post-receive hook seems to not working? #3

@jctophefabre

Description

@jctophefabre

Hi,

Thanks a lot for these package.

It works perfectly when I am trying the example code you are providing:

var express = require("express");
var expressGit = require("express-git");
var app = express();
app.use("/git", expressGit.serve("path/torepos/", {
    auto_init: true,
    serve_static: true,
    authorize: function (service, req, next) {
        // Authorize a service
        next();
    }
});

app.on('post-receive', function (repo, changes) {
    // Do something after a push
    next();
});

app.listen(3000);

But I have two problems:

  • First, it looks like there is a missing closing parenthesis in the example code (before the semicolon on line 11).
  • Second, the post-receive hook seems to not working. The git push works successfully but the app.on('post-receive',... is never called when the push is completed. Is it right?

I saw a closed issue (#2) related to this second problem. I am using express-git 0.7.0, but the expressGit.on() is not recognized (message: expressGit.on is not a function)

Even if am a software developper for years, I am a newbie in using node.js. Maybe I misunderstood something?

Thanks a lot for your answer.
Jean-Christophe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions