Directly invoke and serve GitWeb through NodeJS.
This module uses node-cgi to invoke the
gitweb.cgi perl file.
var http = require'http';var gitweb = require'gitweb';httpcreateServer gitweb'/' listen80;
That's a very simple example.
The first argument is the
mountPoint. This is the HTTP url in which
GitWeb will be served from. It MUST start and end with a
/ slash character.
It's recommended to also pass a second argument, a
that can take the following parameters:
- projectroot - The root directory where git repos will be listed from. Default:
- homelink - The text of the link to the GitWeb root in the top-left corner of each page. Default: the value of projectroot.
- sitename - This value will be prefixed onto the
<title>on each page. Default:
GitWeb powered by Node.
- version - The version value of the internally used
gitweb.cgifile. This can really just be any arbitrary String. Default:
- max_depth - The number of directories deep from projectroot that GitWeb should look for git repos. Default:
- snapshot_default - The "snapshot" links are off by default. If you would like to re-enable them, set this value to something like