Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 23 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,29 @@ GraphQL API Explorer for Learners Guild services.

## Getting Started

1. **Globally** install [nvm][nvm], [avn][avn], and [avn-nvm][avn-nvm].
1. If you have not already, **globally** install [nvm][nvm], [avn][avn], and [avn-nvm][avn-nvm].

```bash
curl -o- https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
npm install -g avn avn-nvm
avn setup
```

2. Clone the repository.
2. Fork and clone this repository.

3. Setup and run [mehserve][mehserve]. Then figure out which port you intend to use and create the mehserve config file:
3. If you have not already, set up and run [mehserve][mehserve]. Then figure out which port you intend to use and create the mehserve config file:

```bash
echo 9002 > ~/.mehserve/graphiql.learnersguild
```

4. Set your `NODE_ENV` environment variable:
4. If you have not already, set your `NODE_ENV` environment variable:

```bash
export NODE_ENV=development
```

5. Get the private and public keys for verifying / extending JWT tokens (see the [idm][idm] service).
5. Get the private and public keys for verifying and extending JWT tokens. They should already be in the `env.development` file in your IDM directory. (See the [idm][idm] service).

6. Create a `.env.development` file for your local environment. Example:

Expand All @@ -39,8 +39,8 @@ GraphQL API Explorer for Learners Guild services.
APP_BASE_URL=http://graphiql.learnersguild.dev
IDM_BASE_URL=http://idm.learnersguild.dev
ECHO_BASE_URL=http://echo.learnersguild.dev
JWT_PRIVATE_KEY="<get from IDM service>"
JWT_PUBLIC_KEY="<get from IDM service>"
JWT_PRIVATE_KEY="<get from .env.development file in your IDM directory>"
JWT_PUBLIC_KEY="<get from .env.development file in your IDM directory>"
```

7. Run the setup tasks:
Expand All @@ -55,10 +55,24 @@ GraphQL API Explorer for Learners Guild services.
npm start
```

9. Visit the server in your browser:
9. Start (`npm start`) both IDM and Echo. Then visit the server’s API explorer in your browser.

```bash
open http://graphiql.learnersguild.dev
http://graphiql.learnersguild.dev
```

10. The API explorer offers access to both IDM and Echo. Choose Echo, then enter the following query in the left pane and click the ▶ button. In the next pane, you should see a JSON representation of Guild member names, handles, and phases, as of the time when the seed data (a mixture of real and fake) were created.

```
query {
findUsers {
name,
handle,
phase {
number
}
}
}
```

## License
Expand Down