{"_id":"54b2a23815a58f31003a0e3a","user":"54348e770ef9c008001651d4","link_url":"","order":0,"api":{"params":[],"results":{"codes":[]},"url":"","auth":"never"},"body":"## Requirements\n\n- Elixir v1.0.2+\n\n[Install Elixir](http://elixir-lang.org/install.html)\n\n    git clone https://github.com/phoenixframework/phoenix.git && cd phoenix && git checkout v0.9.0 && mix do deps.get, compile\n\nCreate a new Phoenix application\n\n    mix phoenix.new my_app /path/to/scaffold/my_app\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Important\",\n  \"body\": \"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.\\n\\n#### Examples:\\n    mix phoenix.new my_app /Users/you/projects/my_app\\n    mix phoenix.new my_app ../relative_path/my_app\"\n}\n[/block]\nChange directory to `/path/to/scaffold/my_app`. Install dependencies and start web server\n\n    mix do deps.get, compile\n    mix phoenix.server\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Note\",\n  \"body\": \"On some Linux systems, Erlang installations do not include the Erlang ssl or inets packages. This will cause hex to fail. If you see a message like this.\\n\\n```console\\n$  mix do deps.get, compile\\nCould not start Hex. Try fetching a new version with `mix local.hex` or uninstalling it with `mix archive.uninstall hex.ez`\\n** (UndefinedFunctionError) undefined function: :ssl.start/0 (module :ssl is not available)\\n. . . \\n```\\nTry installing those packages manually. Of course, substitute the package manager for your system if it doesn't use apt as the example does.\\n\\n```console\\n$ sudo apt-get install erlang-ssl\\n$ sudo apt-get install erlang-inets\\n```\"\n}\n[/block]\nBy default Phoenix accepts requests on port 4000. If we point our favorite web browser at [http://localhost:4000](http://localhost:4000), we should see the Phoenix Framework welcome page.\n\n## What next? \n\nCheck out some of the other guides in the sidebar or view the official [docs](http://hexdocs.pm/phoenix).","category":"54b2a23715a58f31003a0e30","excerpt":"This page will help you get started with Phoenix. You'll be up and running in a jiffy!","link_external":false,"project":"54348ec95b10711400c6c445","updates":["54908ea60c7786160022fb05","549c8227ff61301f00a6c69e","549c8cd8ff61301f00a6c6a6","549c9365ff61301f00a6c6a8","54b185de216cfa1400f219f6","54b2c5ed336cfb0b00608c24","54e0f67bebbf8f0d00b3b8e3"],"githubsync":"","type":"basic","version":"54b2a23715a58f31003a0e2f","__v":4,"createdAt":"2014-10-08T01:09:29.419Z","hidden":false,"slug":"getting-started","sync_unique":"","title":"Getting Started with Phoenix","childrenPages":[]}

Getting Started with Phoenix

This page will help you get started with Phoenix. You'll be up and running in a jiffy!

## Requirements - Elixir v1.0.2+ [Install Elixir](http://elixir-lang.org/install.html) git clone https://github.com/phoenixframework/phoenix.git && cd phoenix && git checkout v0.9.0 && mix do deps.get, compile Create a new Phoenix application mix phoenix.new my_app /path/to/scaffold/my_app [block:callout] { "type": "info", "title": "Important", "body": "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.\n\n#### Examples:\n mix phoenix.new my_app /Users/you/projects/my_app\n mix phoenix.new my_app ../relative_path/my_app" } [/block] Change directory to `/path/to/scaffold/my_app`. Install dependencies and start web server mix do deps.get, compile mix phoenix.server [block:callout] { "type": "info", "title": "Note", "body": "On some Linux systems, Erlang installations do not include the Erlang ssl or inets packages. This will cause hex to fail. If you see a message like this.\n\n```console\n$ mix do deps.get, compile\nCould not start Hex. Try fetching a new version with `mix local.hex` or uninstalling it with `mix archive.uninstall hex.ez`\n** (UndefinedFunctionError) undefined function: :ssl.start/0 (module :ssl is not available)\n. . . \n```\nTry installing those packages manually. Of course, substitute the package manager for your system if it doesn't use apt as the example does.\n\n```console\n$ sudo apt-get install erlang-ssl\n$ sudo apt-get install erlang-inets\n```" } [/block] By default Phoenix accepts requests on port 4000. If we point our favorite web browser at [http://localhost:4000](http://localhost:4000), we should see the Phoenix Framework welcome page. ## What next? Check out some of the other guides in the sidebar or view the official [docs](http://hexdocs.pm/phoenix).