# Phoenix 101

In my [first blog of this series](https://omosa.hashnode.dev/elixir-101), I wrote about what is needed to start an Elixir project. In this blog, we will discuss what is needed to start a Phoenix application.

### What is Phoenix?

[Phoenix](https://hexdocs.pm/phoenix/overview.html) is a web development framework written in Elixir that implements the server-side Model View Controller(MVC) pattern.

To have a Phoenix application up and running, we will need to have the following installed:

* the Elixir programming language, check [Elixir 101](https://omosa.hashnode.dev/elixir-101) on how to install it.
    
* a database - eg PostgreSQL
    

Once you have those setup, you will need to install the Phoenix application generator using the following command:

```apache
mix archive.install hex phx_new
```

### Bootstrapping a Phoenix application

From your preferred directory, run the following command to start a new Phoenix application `hello`

```apache
mix phx.new hello
```

the Phoenix application generator generates the directory structure and all the files we will need for our application. Accept with `Y` when prompted to install dependencies

Once done, move into your application directory by running:

```apache
cd hello
```

Now we will create our database by running:

```apache
mix ecto.create
```

to start the server run:

```apache
mix phx.server
```

the above command starts our server on port 4000 by default, to view go to [http://localhost:4000](http://localhost:4000)
