<commit_before>You can configure Hazelcast Node.js Client declaratively (JSON) or programmatically (API).

* Programmatic configuration
* Declarative configuration (JSON file)

# Programmatic Configuration
For programmatic configuration of the Hazelcast Java Client, just instantiate a ClientConfig object and configure the
desired aspects. An example is shown below.

```javascript
var Config = require('hazelcast-client').Config;
var Address = require('hazelcast-client').Address;
var cfg = new Config.ClientConfig();
cfg.networkConfig.addresses.push(new Address('127.0.0.11', 5701));
return HazelcastClient.newHazelcastClient(cfg);
```

Refer to [Hazelcast Node.js Client API Docs](http://hazelcast.github.io/hazelcast-nodejs-client/api/current/docs) for details.

# Declarative Configuration (JSON)
For declarative configuration, the Hazelcast client looks at the following places for the client configuration file.

1. Environment variable: The client first looks for the environment variable `HAZELCAST_CLIENT_CONFIG`. If it exists,
the client looks for the configuration file in the specified location.
2. Current working directory: If there is no environment variable set, the client tries to load `hazelcast-client.json`
from the current working directory.
3. Default configuration: If all of the above methods fail, the client starts with the default configuration.

Following is a sample JSON configuration file:

```json
{
    "group": {<commit_msg>update address configuration (#334)<commit_after>You can configure Hazelcast Node.js Client declaratively (JSON) or programmatically (API).

* Programmatic configuration
* Declarative configuration (JSON file)

# Programmatic Configuration
For programmatic configuration of the Hazelcast Java Client, just instantiate a ClientConfig object and configure the
desired aspects. An example is shown below.

```javascript
var Config = require('hazelcast-client').Config;
var Address = require('hazelcast-client').Address;
var cfg = new Config.ClientConfig();
cfg.networkConfig.addresses.push('127.0.0.1:5701');
return HazelcastClient.newHazelcastClient(cfg);
```

Refer to [Hazelcast Node.js Client API Docs](http://hazelcast.github.io/hazelcast-nodejs-client/api/current/docs) for details.

# Declarative Configuration (JSON)
For declarative configuration, the Hazelcast client looks at the following places for the client configuration file.

1. Environment variable: The client first looks for the environment variable `HAZELCAST_CLIENT_CONFIG`. If it exists,
the client looks for the configuration file in the specified location.
2. Current working directory: If there is no environment variable set, the client tries to load `hazelcast-client.json`
from the current working directory.
3. Default configuration: If all of the above methods fail, the client starts with the default configuration.

Following is a sample JSON configuration file:

```json
{
    "group": {
{'fraction_non_alphanumeric': 0.07681802663024923, 'fraction_numerical': 0.010242403550699898, 'mean_word_length': 5.659090909090909, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6008080', 'n_tokens_mistral': 778, 'n_tokens_neox': 753, 'n_words': 321}