node-git-server icon indicating copy to clipboard operation
node-git-server copied to clipboard

HTTPS support

Open fedetango opened this issue 3 years ago • 3 comments

Does the module have support for HTTPS / HTTP2? If not, would you consider implementing it?

Thanks

fedetango avatar Jan 12 '23 23:01 fedetango

It does. See: https://gabrielcsapo.github.io/node-git-server/docs/intro

axkibe avatar Jan 24 '23 15:01 axkibe

It does. See: https://gabrielcsapo.github.io/node-git-server/docs/intro

Thanks for the reply.

However, there are things that I can't find in this link. For example, how do I establish the certificates that the server uses?

fedetango avatar Jan 24 '23 16:01 fedetango

Thanks for the reply.

However, there are things that I can't find in this link. For example, how do I establish the certificates that the server uses?

You should use options in listen method.

 /**
   * starts a git server on the given port
   * @param  port  - the port to start the server on
   * @param  options  - the options to add extended functionality to the server
   * @param  options.type - this is either https or http (the default is http)
   * @param  options.key - private key in PEM format for the https server
   * @param  options.cert - cert chains in PEM format for the https server
   * @param  callback - the function to call when server is started or error has occurred
   */
  listen(port: number, options?: GitServerOptions, callback?: () => void): Git {

verside2 avatar Apr 03 '23 09:04 verside2