• Stars
    star
    170
  • Rank 216,104 (Top 5 %)
  • Language
    CSS
  • Created about 8 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Phoenix, Docker, Webpack, React, GraphQL, Relay, Flow, Eslint, Immutable.js, Jest and RethinkDB

Phoenix hipster stack!

Example app

Phoenix hipster stack comes with an example app.

The app is a port of the node.js app built in the Building Data-driven React Applications with Relay, GraphQL, and Flux course from Pluralsight. The app is running on a 512mb single core droplet on digitalocean.

More instressed in Elm ? Check out elm-hipster-stack

Getting Started

Clone this repo then:

  1. Install dependencies with mix deps.get && npm i
  2. Start rethinkDB rethinkdb
  3. Start Phoenix endpoint with mix phoenix.server
  4. Create database by going to localhost:4000/reset
  5. Visit localhost:4000/graphql to test the amazing graphiql interface
  6. Query the database
query myQuery{
  store{
    authors {
      id
      name
    }
  }
}

  1. Visit localhost:4000 for a basic relay app using the data.

Jest is not implemented. Feel free to contribute :)

DOCKER

  1. docker-compose build
  2. docker-compose up
  3. visit localhost:4001/reset
  4. visit localhost:4001

Make your own project

  1. git clone [email protected]:graphql-elixir/phoenix-hipster-stack.git <name-of-your-project>
  2. cd <name-of-your-project> rm -rf .git
  3. git init
  4. git remote add orgin <your-new-repo>
  5. git push -u orgin master

When changeing the graphql schemas run mix CreateSchema to make a new schema.json. This schema.json is used by Relay.

Running in production.

MyAwesomePrompt> MIX_ENV=prod mix compile
MyAwesomePrompt> MIX_ENV=prod mix phoenix.digest
MyAwesomePrompt> MIX_ENV=prod PORT=4000 mix phoenix.server

###Used resourses