Files
Angelo 1970b8e93b New Starters for Updated Buildpacks (#238)
* updated starters

* dd agent add
2022-02-04 16:53:45 -05:00

37 lines
1.4 KiB
Markdown

---
title: Elixir Phoenix
description: A Phoenix application that connects to a PostgreSQL database
tags:
- elixir
- phoenix
- postgresql
---
# Elixir Phoenix Example
This example is a [Phoenix](https://www.phoenixframework.org/) application that
connects to a Railway Postgres database.
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/button.svg)](https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2Frailwayapp%2Fexamples%2Ftree%2Fmaster%2Fexamples%2Felixir-phoenix&plugins=postgresql&envs=SECRET_KEY_BASE%2CPOOL_SIZE%2CDATABASE_URL&DATABASE_URLDesc=Connection+string+for+DB&POOL_SIZEDefault=2&DATABASE_URLDefault=postgres%3A%2F%2F%24%7B%7B+PGUSER+%7D%7D%3A%24%7B%7B+PGPASSWORD+%7D%7D%40%24%7B%7B+PGHOST+%7D%7D%3A%24%7B%7B+PGPORT+%7D%7D%2F%24%7B%7B+PGDATABASE+%7D%7D)
## ✨ Features
- Elixir
- Phoenix
- Postgres
## 💁‍♀️ How to use
- [Create a Railway project with the Postgres plugin](https://railway.app/project?plugins=postgresql)
- Connect to your Railway project with `railway link`
- Install dependencies with `railway run mix deps.get`
- Migrate the database `railway run mix ecto.migrate`
- Install node dependencies with `cd assets && npm install`
- Run the Phoenix app `railway run mix phx.server`
## 📝 Notes
This example was generated by running `mix phx.new`.
Read more about Phoenix at their [official documentation](https://hexdocs.pm/phoenix/api-reference.html#content).