- [Phoenix] (http://www.phoenixframework.org/)
- [React] (https://facebook.github.io/react/)
- Relay
- GraphQL
- RethinkDB
- Webpack
- Hot module reload
- Immutable.js
- Flow
- Eslint
- Jest
- Docker
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
Clone this repo then:
- Install dependencies with
mix deps.get && npm i
- Start rethinkDB
rethinkdb
- Start Phoenix endpoint with
mix phoenix.server
- Create database by going to
localhost:4000/reset
- Visit
localhost:4000/graphql
to test the amazing graphiql interface - Query the database
query myQuery{
store{
authors {
id
name
}
}
}
- Visit
localhost:4000
for a basic relay app using the data.
Jest is not implemented. Feel free to contribute :)
docker-compose build
docker-compose up
visit localhost:4001/reset
visit localhost:4001
git clone [email protected]:graphql-elixir/phoenix-hipster-stack.git <name-of-your-project>
cd <name-of-your-project> rm -rf .git
git init
git remote add orgin <your-new-repo>
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.
MyAwesomePrompt> MIX_ENV=prod mix compile
MyAwesomePrompt> MIX_ENV=prod mix phoenix.digest
MyAwesomePrompt> MIX_ENV=prod PORT=4000 mix phoenix.server
###Used resourses
- updated-phoenix-webpack-react-setup
- GraphQL & RethinkDB
- GraphQL-Elixir
- plug_GraphQL
- [graphql-phoenix-rethinkdb] (https://github.com/AdamBrodzinski/graphql-phoenix-rethinkdb)
- phoenix-rethinkdb-example