Blog Post Corresponding to this Repo: https://medium.com/@grantmnelsn/how-to-setup-graphql-vue-js-and-phoenix-1-3-part-1-the-backend-e3305641e5c
Key Components:
- Vue.js, supporting single-file .vue components.
- Webpack
- Apollo
- GraphQL, using Absinthe
- Phoenix/Elixir backend
Key Omissions:
- Haven't tested deployment yet.
- No subscription support for websockets yet.
This stubs out Phoenix 1.3, Apollo 2.X, GraphQL via Absinthe.
- Clone this repo.
- Install dependencies with
mix deps.get
- Install Node dependencies with
cd assets && npm install && cd ..
- Create and migrate your database with
mix ecto.create && mix ecto.migrate
- Start Phoenix endpoint and an interactive Elixir session with
iex -S mix phx.server
. Webpack will watch the assets folder. Visitlocalhost:4000
from your browser.
Test Installation:
To start your Phoenix server:
- Install dependencies with
mix deps.get
- Create and migrate your database with
mix ecto.create && mix ecto.migrate
- Start Phoenix endpoint with
mix phx.server
Now you can visit localhost:4000
from your browser.
Ready to run in production? Please check our deployment guides.