Skip to content

Provided example script hangs. #90

@x90slide

Description

@x90slide

`
Git = require('node-git-server').Git
join = require('path').join

const port = !process.env.PORT || isNaN(process.env.PORT)
? 7005
: parseInt(process.env.PORT);

const repos = new Git(
join(__dirname, '../repo'),
{
autoCreate: true,
}
);

repos.on('push', push => {
console.log(push ${push.repo}/${push.commit} ( ${push.branch} ));
push.accept();
});

repos.on("fetch", fetch => {
console.log(fetch ${fetch.commit});
fetch.accept();
});

repos.listen(port, () => {
console.log(node-git-server running at http://localhost:${port});
});`

Running this code with 'node index.js' hangs immediately and the server does not start.

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