<commit_before>![phoenix logo](https://raw.githubusercontent.com/phoenixframework/phoenix/master/priv/static/images/phoenix.png)
> Elixir Web Framework targeting full-featured, fault tolerant applications with realtime functionality

[![Build Status](https://api.travis-ci.org/phoenixframework/phoenix.svg)](https://travis-ci.org/phoenixframework/phoenix)
[![Inline docs](http://inch-ci.org/github/phoenixframework/phoenix.svg)](http://inch-ci.org/github/phoenixframework/phoenix)

***

- [Getting started](#getting-started)
  - [Requirements](#requirements)
  - [Setup](#setup)
  - [Router example](#router-example)
    - [Resources](#resources)
    - [Method Overrides](#method-overrides)
  - [Controller examples](#controller-examples)
  - [Views & Templates](#views--templates)
  - [Flash Examples](#flash-examples)
  - [Rendering from the Controller](#rendering-from-the-controller)
    - [More on request format](#more-on-request-format)
    - [More on layouts](#more-on-layouts)
  - [Template Engine Configuration](#template-engine-configuration)
  - [PubSub](#pubsub)
  - [Channels](#channels)
    - [Holding state in socket connections](#holding-state-in-socket-connections)
  - [Configuration](#configuration)
    - [Configuration file structure](#configuration-file-structure)
    - [Configuration for SSL](#configuration-for-ssl)
    - [Serving Your Application Behind a Proxy](#serving-your-application-behind-a-proxy)
    - [Configuration for Sessions](#configuration-for-sessions)
  - [Custom Not Found and Error Pages](#custom-not-found-and-error-pages)
    - [Plug.Exception](#plugexception)
  - [Mix Tasks](#mix-tasks)
  - [Static Assets](#static-assets)
- [Documentation](#documentation)
- [Development](#development)
  - [Building phoenix.coffee](#building-phoenixcoffee)
- [Contributing](#contributing)
- [Important links](#important-links)
- [Feature Roadmap](#feature-roadmap)


## Getting started

### Requirements

- Elixir v1.0.2+

### Setup

1. Install Phoenix

        git clone https://github.com/phoenixframework/phoenix.git && cd phoenix && git checkout v0.7.2 && mix do deps.get, compile


2. Create a new Phoenix application

        mix phoenix.new my_app /path/to/scaffold/my_app

    *Important*: Run this task in the Phoenix installation directory cloned in the step above. The path provided: `/path/to/scaffold/my_app/` should be outside of the framework installation directory. This will either create a new application directory or install the application into an existing directory.

    #### Examples:
        mix phoenix.new my_app /Users/you/projects/my_app
        mix phoenix.new my_app ../relative_path/my_app

3. Change directory to `/path/to/scaffold/my_app`. Install dependencies and start web server

        mix do deps.get, compile
        mix phoenix.server


When running in production, use protocol consolidation for increased performance:<commit_msg>Adding link to official site<commit_after>![phoenix logo](https://raw.githubusercontent.com/phoenixframework/phoenix/master/priv/static/images/phoenix.png)
> Elixir Web Framework targeting full-featured, fault tolerant applications with realtime functionality

[![Build Status](https://api.travis-ci.org/phoenixframework/phoenix.svg)](https://travis-ci.org/phoenixframework/phoenix)
[![Inline docs](http://inch-ci.org/github/phoenixframework/phoenix.svg)](http://inch-ci.org/github/phoenixframework/phoenix)

***

- [Getting started](#getting-started)
  - [Requirements](#requirements)
  - [Setup](#setup)
  - [Router example](#router-example)
    - [Resources](#resources)
    - [Method Overrides](#method-overrides)
  - [Controller examples](#controller-examples)
  - [Views & Templates](#views--templates)
  - [Flash Examples](#flash-examples)
  - [Rendering from the Controller](#rendering-from-the-controller)
    - [More on request format](#more-on-request-format)
    - [More on layouts](#more-on-layouts)
  - [Template Engine Configuration](#template-engine-configuration)
  - [PubSub](#pubsub)
  - [Channels](#channels)
    - [Holding state in socket connections](#holding-state-in-socket-connections)
  - [Configuration](#configuration)
    - [Configuration file structure](#configuration-file-structure)
    - [Configuration for SSL](#configuration-for-ssl)
    - [Serving Your Application Behind a Proxy](#serving-your-application-behind-a-proxy)
    - [Configuration for Sessions](#configuration-for-sessions)
  - [Custom Not Found and Error Pages](#custom-not-found-and-error-pages)
    - [Plug.Exception](#plugexception)
  - [Mix Tasks](#mix-tasks)
  - [Static Assets](#static-assets)
- [Documentation](#documentation)
- [Development](#development)
  - [Building phoenix.coffee](#building-phoenixcoffee)
- [Contributing](#contributing)
- [Important links](#important-links)
- [Feature Roadmap](#feature-roadmap)


## Getting started

- Also see the offical site at http://www.phoenixframework.org/

### Requirements

- Elixir v1.0.2+

### Setup

1. Install Phoenix

        git clone https://github.com/phoenixframework/phoenix.git && cd phoenix && git checkout v0.7.2 && mix do deps.get, compile


2. Create a new Phoenix application

        mix phoenix.new my_app /path/to/scaffold/my_app

    *Important*: Run this task in the Phoenix installation directory cloned in the step above. The path provided: `/path/to/scaffold/my_app/` should be outside of the framework installation directory. This will either create a new application directory or install the application into an existing directory.

    #### Examples:
        mix phoenix.new my_app /Users/you/projects/my_app
        mix phoenix.new my_app ../relative_path/my_app

3. Change directory to `/path/to/scaffold/my_app`. Install dependencies and start web server

        mix do deps.get, compile
        mix phoenix.server


When running in production, use protocol consolidation for increased performance:
{'fraction_non_alphanumeric': 0.1325076348829318, 'fraction_numerical': 0.003053953172718018, 'mean_word_length': 4.301258992805756, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 8, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5228122', 'n_tokens_mistral': 1818, 'n_tokens_neox': 1727, 'n_words': 406}