<commit_before># nodejs-tutorme

The nodejs-tutorme repository contains the server side code backend for the mobile app. It is written using NodeJS, Express, and all the other bits and pieces that come with these frameworks.

## Instructions

In order to run the server, you need to have `node` and `npm` installed on your system. Refer to the nodejs documentation for instructions on how to install nodejs to your system.

Once you have these packages install, change your working directory to the nodejs-tutorme project. Then, run the following:

```sh
$ npm install
```

This will automatically install all the required dependencies that the server software relies on. Next, configure the server by editing `config.js`. The key areas are the `ssl` object and the `db` object.

```javascript
ssl: {
  key:  'ssl/key.pem',
  cert: 'ssl/cert.pem'
}

db: { 
  development: {
    name: '',
    user: '',
    password: ''
  },
  production: {
    name: '',
    user: '',
    password: ''
  }
}
```

Once you have setup the configuration, the server is ready to run. Now, simply set the executable bit on the `app.js` file and execute like so:

```sh
$ ./app.js
```
<commit_msg>Added mode to config section<commit_after># nodejs-tutorme

The nodejs-tutorme repository contains the server side code backend for the mobile app. It is written using NodeJS, Express, and all the other bits and pieces that come with these frameworks.

## Instructions

In order to run the server, you need to have `node` and `npm` installed on your system. Refer to the nodejs documentation for instructions on how to install nodejs to your system.

Once you have these packages install, change your working directory to the nodejs-tutorme project. Then, run the following:

```sh
$ npm install
```

This will automatically install all the required dependencies that the server software relies on. Next, configure the server by editing `config.js`. The key areas are the `ssl` object and the `db` object.

```javascript
mode: "production" // (or "development", etc)

ssl: {
  key:  'ssl/key.pem',
  cert: 'ssl/cert.pem'
}

db: { 
  development: {
    name: '',
    user: '',
    password: ''
  },
  production: {
    name: '',
    user: '',
    password: ''
  }
}
```

Once you have setup the configuration, the server is ready to run. Now, simply set the executable bit on the `app.js` file and execute like so:

```sh
$ ./app.js
```

{'fraction_non_alphanumeric': 0.09626556016597511, 'fraction_numerical': 0.0, 'mean_word_length': 3.6724806201550386, 'pattern_counts': {'":': 0, '<': 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': '843624', 'n_tokens_mistral': 709, 'n_tokens_neox': 685, 'n_words': 333}