Configuring a Node.js server

To configure the Node.js server, edit the values of properties in the config.json file.

About this task

The steps below assume that the Node.js server is installed on Linux.

For the full list of properties that you can set in the config.json file, see Configuration properties.

Procedure

  1. Navigate to /rtc-git-server-toolkit/server and open the config.json file. Each configuration parameter has a description that describes the semantics of the property.
  2. Configure the Git-Repositories-Root-Dir property. Specify the full path to the parent folder, which contains the Git repositories. For example, if the Git repositories are in /var/opt/git-data/repositories, then set the property as follows:
    "Git-Repositories-Root-Dir": "/var/opt/git-data/repositories",
  3. To configure authentication for the Node.js server, see Configuring authentication for a Node.js server. This example shows the Auth-Profiles property set to use the Rational Team Concert™ server for authentication:
    "Auth-Profiles": {
    	    "rtc-server-9443": {
    	        "type": "BASIC",
    	        "url":"https://rtc-server:9443/ccm/secure/authenticated/identity",
        "method": "GET"
    	    }
    	}
  4. Optional: Configure the Server-Port property. Set the value to the port number where you want to run the node server. For example: "Server-Port": 8888,
  5. Optional: Configure the Git-Executable-Path property. Set the value to the path of the git executable. If git is included in the PATH enviornment variable, then specifying git as the value is enough. For example: "Git-Executable-Path":"/usr/local/bin/git",
  6. Optional: Configure the Git-URL-Prefixes property. This property defines the URL prefix for Git repositories, and specifies which authentication profile should be applied. This prefix determines the URLs of your Git repositories. If you do not change this value, then Git repositories can be accessed through the prefix git. In the following example, a Git repository at the location /var/opt/git-data/repositories/myfirstrepo.git can be accessed using HTTP with the URL http://git-server-url:8888/git/myfirstrepo.git. The authentication profile rtc-server-9443 is applied.
    "Git-URL-Prefixes": {
    	    "/git": {
    	        "authProfile": "rtc-server-9443"
    	    }
    	}
  7. Save the config.json file.

video icon Video

Jazz.net channel
Software Education channel

learn icon Courses

IoT Academy
Skills Gateway

ask icon Community

Jazz.net
Jazz.net forums
Jazz.net library

support icon Support

IBM Support Community
Deployment wiki