Initial Setup

Get Phoenix installed and create your first web application. This guide walks you through installation and building your first Phoenix app.

🎯 What You’ll Accomplish

By the end of this tutorial, you’ll have:

  • βœ… Elixir and Phoenix installed
  • βœ… Your first Phoenix project created
  • βœ… Development server running

πŸ“‹ Prerequisites

  • Elixir 1.14 or later
  • PostgreSQL installed
  • Node.js (for asset compilation)

πŸ’Ύ Step 1: Install Phoenix

mix archive.install hex phx_new

πŸš€ Step 2: Create Your First Project

mix phx.new myapp
cd myapp

πŸ”§ Step 3: Configure Database

Edit config/dev.exs and update database credentials if needed.

Create database:

mix ecto.create

πŸ“Š Step 4: Start the Server

mix phx.server

Visit http://localhost:4000 to see your Phoenix app.

βœ… Verification Checklist

Before moving forward, verify:

  • Phoenix installed successfully
  • Project created without errors
  • Database created
  • Server runs and loads in browser

πŸŽ‰ You’re Done!

You’ve successfully installed Phoenix and created your first web application.

πŸ“š What’s Next?

Quick learner: Elixir Phoenix Quick Start

Code-first learner: Elixir Phoenix By Example

Last updated