<commit_before>## Installing

``` bash
cd application
composer install
```

## Configuring

Environment needs to be setup by adding a `.env` (see
[vlucas/phpdotenv](https://github.com/vlucas/phpdotenv)) file containing
something like:

``` shell
SYMFONY_ENV=dev
SYMFONY_DEBUG=1
SYMFONY__SECRET=super-secret-string
SYMFONY__MONOLOG_ACTION_LEVEL=debug
SYMFONY__REDIS__SCHEME=tcp
SYMFONY__REDIS__HOST=localhost
SYMFONY__REDIS__PORT=6379
```

> See [external
> parameters](http://symfony.com/doc/current/cookbook/configuration/external_parameters.html)
> regarding **SYMFONY__** prefixed environment variables.

Worth mentioning:
* It uses a directory structure similar to the one described
  [here](http://stackoverflow.com/questions/23993295/what-is-the-new-symfony-3-directory-structure/23994473#23994473),
  so make sure the **httpd** or **fcgi** user can write to `var/`.

Now you should be able to visit `http://localhost:8080/`.

## cURL Examples

``` bash
$ curl -X POST --data-binary 'Lorem ipsum' http://127.0.0.1:8080/
# 201 Created
# Location: /54ae
# X-Paste-Token: 99d6a7cb2f
http://127.0.0.1:8080/54ae

$ curl http://127.0.0.1:8080/54ae
# 200 OK
Lorem ipsum

$ curl -H 'X-Paste-Token: <KEY>' -X PUT --data-binary 'Lipsum lorem' \
    http://127.0.0.1:8080/54ae
# 204 No Content

$ curl http://127.0.0.1:8080/54ae
# 200 OK
Lipsum lorem

$ curl -H 'X-Paste-Token: <KEY>' -X DELETE \
    http://127.0.0.1:8080/54ae
# 204 No Content
```<commit_msg>Modified readme<commit_after># Alcohol\sf-minimal-demo

A demo that attempts to setup a minimalistic Symfony application.

Inspired by: http://www.whitewashing.de/2014/10/26/symfony_all_the_things_web.html

[![Build Status](https://img.shields.io/travis/alcohol/sf-minimal-demo/master.svg?style=flat-square)](https://travis-ci.org/alcohol/sf-minimal-demo)

## Installing

``` bash
git clone https://github.com/alcohol/sf-minimal-demo.git
cd sf-minimal-demo
composer install
cp .env.example .env
```

## Configuring

Environment needs to be setup by adding a `.env` (see
[vlucas/phpdotenv](https://github.com/vlucas/phpdotenv)) file containing
something like:

``` shell
SYMFONY_ENV=dev
SYMFONY_DEBUG=1
SYMFONY__SECRET=super-secret-string
SYMFONY__MONOLOG_ACTION_LEVEL=debug
SYMFONY__REDIS__SCHEME=tcp
SYMFONY__REDIS__HOST=localhost
SYMFONY__REDIS__PORT=6379
```

> See [external
> parameters](http://symfony.com/doc/current/cookbook/configuration/external_parameters.html)
> regarding **SYMFONY__** prefixed environment variables.

Worth mentioning:
* It uses a directory structure similar to the one described
  [here](http://stackoverflow.com/questions/23993295/what-is-the-new-symfony-3-directory-structure/23994473#23994473),
  so make sure the **httpd** or **fcgi** user can write to `var/`.

Now you should be able to visit `http://localhost:8080/`.

## cURL Examples

``` bash
$ curl -X POST --data-binary 'Lorem ipsum' http://127.0.0.1:8080/
# 201 Created
# Location: /54ae
# X-Paste-Token: <KEY>
http://127.0.0.1:8080/54ae

$ curl http://127.0.0.1:8080/54ae
# 200 OK
Lorem ipsum

$ curl -H 'X-Paste-Token: <KEY>' -X PUT --data-binary 'Lipsum lorem' \
    http://127.0.0.1:8080/54ae
# 204 No Content

$ curl http://127.0.0.1:8080/54ae
# 200 OK
Lipsum lorem

$ curl -H 'X-Paste-Token: <KEY>' -X DELETE \
    http://127.0.0.1:8080/54ae
# 204 No Content
```

## Contributing

Feel free to submit a pull request or create an issue.

## License

Alcohol\sf-minimal-demo is licensed under the MIT license.
{'fraction_non_alphanumeric': 0.14500288850375506, 'fraction_numerical': 0.07365684575389948, 'mean_word_length': 4.377329192546584, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 14, 'https://': 5, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 12, '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': '841614', 'n_tokens_mistral': 1469, 'n_tokens_neox': 1290, 'n_words': 291}