<commit_before># scribbles

## Node Web Service

A barebones starter project for a Node.js web service and web service client.

### Running

To run the server:

```sh
node node-ws/server/main.js
```
to run the client:

```sh
node node-ws/client/main.js
```

### Resource API

The base resource API is published at `http://localhost:3000/demo-ws/v1.0`.

```json
{
    "root": {
        "href": "http://localhost:3000/",
        "methods": {
            "GET": {
                "produces": "application/json"
            }
        }
    },
    "api": {
        "href": "http://localhost:3000/demo-ws/v1.0",
        "methods": {
            "GET": {
                "produces": "application/json"
            }
        }
    },
    "error": {
        "href": "http://localhost:3000/error",
        "methods": {
            "GET": {
                "produces": "application/json"
            }
        }
    },
    "example": {
        "href": "http://localhost:3000/demo-ws/v1.0/example",
        "methods": {
            "GET": {
                "produces": "application/json"
            },
            "HEAD": {},
            "PUT": {
                "consumes": "application/json",
                "produces": "application/json"
            },
            "PATCH": {
                "consumes": "application/json",
                "produces": "application/json"
            },
            "POST": {
                "consumes": "application/json",
                "produces": "application/json"
            },
            "DELETE": {}
        }
    }
}```

### Adding a New Resource Module

Additional resource modules can be defined as illustrated by the the [example](./node-ws/server/resources/example.js)
module, and then added to the configuration.
<commit_msg>cleanup<commit_after># scribbles

## Node Web Service

A barebones starter project for a Node.js web service and web service client.

### Running

To run the server:

```sh
node node-ws/server/main.js
```
to run the client:

```sh
node node-ws/client/main.js
```

### Resource API

The base resource API is published at `http://localhost:3000/demo-ws/v1.0`.

Additional resource modules can be defined as illustrated by the the [example](./node-ws/server/resources/example.js)
module, and then added to the configuration.

```json
{
    "root": {
        "href": "http://localhost:3000/",
        "methods": {
            "GET": {
                "produces": "application/json"
            }
        }
    },
    "api": {
        "href": "http://localhost:3000/demo-ws/v1.0",
        "methods": {
            "GET": {
                "produces": "application/json"
            }
        }
    },
    "error": {
        "href": "http://localhost:3000/error",
        "methods": {
            "GET": {
                "produces": "application/json"
            }
        }
    },
    "example": {
        "href": "http://localhost:3000/demo-ws/v1.0/example",
        "methods": {
            "GET": {
                "produces": "application/json"
            },
            "HEAD": {},
            "PUT": {
                "consumes": "application/json",
                "produces": "application/json"
            },
            "PATCH": {
                "consumes": "application/json",
                "produces": "application/json"
            },
            "POST": {
                "consumes": "application/json",
                "produces": "application/json"
            },
            "DELETE": {}
        }
    }
}```

{'fraction_non_alphanumeric': 0.15827132226674298, 'fraction_numerical': 0.014882655981682884, 'mean_word_length': 1.514388489208633, 'pattern_counts': {'":': 62, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '1478715', 'n_tokens_mistral': 1068, 'n_tokens_neox': 998, 'n_words': 221}