<commit_before># Contributing

## Web Server

### Simple PHP Server

For a simple local development environment running on PHP, you will need:

* [A supported version of PHP](http://php.net/supported-versions.php) with:
  * `php-cli`
  * `php-curl`
  * `php-intl`
  * `php-json`
  * `php-mbstring`
  * `php-sqlite3`
  * `php-xml`
  * `composer`
* [Node.js](https://nodejs.org/) and `npm`
  * packages installed with `npm ci`

These can be most easily installed on elementaryOS 5.0 (Ubuntu 18.04) with this script:

```
sudo apt install php-cli php-curl php-intl php-json php-sqlite3 php-mbstring php-xml composer &&
sudo apt install nodejs npm &&
npm ci
```

Then inside the project directory, run `npm run build && npm run start`. Next,
just navigate to [localhost:8000](http://localhost:8000/) to view the site.

If you are working on CSS and would like an easier time developing, you can run
the `npx gulp watch` command. This will watch for any CSS and image changes,
and rebuild on the fly.

### Nginx Web Server

For a full web-server environment, which includes more redirect and permissions
you may find useful, you will need:

* Everything required for "Simple PHP Server" (above)
* The latest stable version of [Nginx](http://nginx.org)
* `php7.0-fpm`

Then, we need to configure Nginx. To start, open up a configuration file in<commit_msg>CONTRIBUTING: elementary OS 6 directions (#2612)<commit_after># Contributing

## Web Server

### Simple PHP Server

For a simple local development environment running on PHP, you will need:

* [A supported version of PHP](http://php.net/supported-versions.php) with:
  * `php-cli`
  * `php-curl`
  * `php-intl`
  * `php-json`
  * `php-mbstring`
  * `php-sqlite3`
  * `php-xml`
  * `composer`
* [Node.js](https://nodejs.org/) and `npm`
  * packages installed with `npm ci`

First, install Node.js (12.x recommended) from [Nodesource](https://github.com/nodesource/distributions/blob/master/README.md#debian-and-ubuntu-based-distributions). elementary OS 6 is [not yet supported by Nodesource](https://github.com/nodesource/distributions/pull/1159), so you may need to download the provided installation script, modify it first to map `elementaryOS` `odin` to `Ubuntu` `focal`, then `chmod +x` the script and run it as root.

The rest can be most easily installed from Terminal on elementary OS 5.x (Ubuntu 18.04) or 6.x (Ubuntu 20.04):

```
sudo apt install php-cli php-curl php-intl php-json php-sqlite3 php-mbstring php-xml composer &&
npm ci
```

Then inside the project directory, run `npm run build && npm run start`. Next,
just navigate to [localhost:8000](http://localhost:8000/) to view the site.

If you are working on CSS and would like an easier time developing, you can run
the `npx gulp watch` command. This will watch for any CSS and image changes,
and rebuild on the fly.

### Nginx Web Server

For a full web-server environment, which includes more redirect and permissions
you may find useful, you will need:

* Everything required for "Simple PHP Server" (above)
* The latest stable version of [Nginx](http://nginx.org)
* `php7.0-fpm`

Then, we need to configure Nginx. To start, open up a configuration file in
{'fraction_non_alphanumeric': 0.11013215859030837, 'fraction_numerical': 0.016362492133417242, 'mean_word_length': 4.144012944983818, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1742915', 'n_tokens_mistral': 1059, 'n_tokens_neox': 964, 'n_words': 406}