Skip to content

Commit fcbc999

Browse files
committed
Update Readme for curious people.
1 parent 940005c commit fcbc999

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

readme.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,15 @@
22

33
Provides an Apollo GraphQL client on Reactium.GraphQL singleton in Reactium project.
44

5+
## About this Repository
6+
This repository is a mono-style repo (for publishing the @reactium/graphql Reactium module to the Reactium registry), but it's also a Reactium project itself, complete with an example deno GraphQL server and a Reactium example front-end that uses the @reactium/graphql module.
7+
8+
See below for if you want to play around with this repository in your local environment.
9+
510
## Install
611

12+
To install this module in your own Reactium project:
13+
714
```sh
815
npx reactium install @reactium/graphql
916
```
@@ -48,6 +55,8 @@ export const UsersList = () => {
4855

4956
## Configuration
5057

58+
There are a number of environment variables that this module will use in your Reactium project.
59+
5160
- **GraphQL Playground** - Enabled by default in local development, disabled by default in production environment. To set the playground URL **(Defaults to `/playground`)**, set the environment variable `GRAPHQL_PLAYGROUND_URL`
5261

5362
```bash
@@ -70,4 +79,33 @@ export const UsersList = () => {
7079
```bash
7180
export GRAPHQL_PROXY_URL="/my-graphql-api"
7281
```
73-
> Note: Changing this proxy URL will also change the default GraphQL Server URL (unless you have set it with `GRAPHQL_URL`)
82+
> Note: Changing this proxy URL will also change the default GraphQL Server URL (unless you have set it with `GRAPHQL_URL`)
83+
84+
## Using this demo GraphQL server
85+
86+
This repository has an example deno server that runs a GraphQL server.
87+
88+
See `./GraphQLServer` for the deno server. You will need to have [deno installed](https://docs.deno.com/runtime/manual/) and configure your local mongo instance credentials, by adding the `MONGODB_URI` variable to `./GraphQLServer/.env`:
89+
90+
```
91+
MONGODB_URI=mongodb://deno:denopwd@localhost:27017/deno
92+
```
93+
> Example local mongodb URI
94+
95+
I'd also recommend installing [denon](https://deno.land/x/denon@2.5.0/docs/installation.md?source=) (like nodemon for deno) for easy startup of the server locally:
96+
97+
```sh
98+
cd ./GraphQLServer
99+
denon start
100+
```
101+
102+
## Starting the UI
103+
104+
This repository includes a Reactium project with a UI that can interact with the included Deno server.
105+
106+
To start the UI:
107+
108+
```sh
109+
npx reactium install # first time to install dependencies (includes npm dependencies as well)
110+
npm run local
111+
```

0 commit comments

Comments
 (0)