node-git-server logonode-git-server

Installation

node-git-server is a configurable git server written in Node.js. It exposes git repositories over HTTP and HTTPS and lets you hook into every fetch, push and tag.

Requirements

  • Node.js 22 or newer. The package uses modern Node APIs and the node: protocol.
  • The git binary must be available on the host PATH — the server shells out to git-upload-pack / git-receive-pack to speak the git wire protocol.

Install

npm i @batchfy/node-git-server
pnpm add @batchfy/node-git-server
yarn add @batchfy/node-git-server

ESM only

The package is ESM only — import it, require() is not supported:

import { Git } from "@batchfy/node-git-server"

If your project is still CommonJS, either switch your file to ESM ("type": "module" in package.json) or load it dynamically:

const { Git } = await import("@batchfy/node-git-server")

Zero dependencies

The library has no runtime dependencies. All streaming is built on Node's native node:stream, so installing it pulls in nothing else.