Skip to content

Conversation

h110m
Copy link

@h110m h110m commented Aug 16, 2022

Ref: #100

@agutoli
Copy link

agutoli commented Sep 8, 2022

For now this PR is not merge yet, so an alternative is doing that (at least until this PR merged);

// import http server
const http = require('http');

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

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

// with this
repos.server = http.createServer((req, res) => {
  repos.handle(req, res);
});

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants