- Root directory contains the code for API App
client
directory contains the code for Frontend App
Run command in the project root directory docker-compose up --build -d
- Install
Elixir ~> V1.8
if you do not have it installed before (https://elixir-lang.org/install.html) - Make sure you are in the project root directory
- Install dependencies with
mix deps.get
- Start Phoenix endpoint with
mix phx.server
Now you can test your GraphQL API via (http://localhost:4000/graphiql) Query Examples:
{
location (address: "255 Bourke St, Melbourne VIC 3000") {
map_url
lat
lng
}
}
mutation Add($name: String!, $address: String!) {
addBookmark(name: $name, address: $address) {
name
address
}
}
//GRAPHQL VARIABLES
{
"name": "Some Building",
"address": "115 Bourke St, Melbourne VIC 3000"
}
mutation remove_bookmark {
remove_bookmark(
id: 180144
) {
id
}
}
- Install
yarn
if you do not have it installed before (https://classic.yarnpkg.com/en/docs/install/#mac-stable) - Go to the this
/client/
directory first - Install dependencies with
yarn install
- Start React App with
yarn start
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.