You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This version of GraphiQL is a fork of the original version with a simple header management UI.
4
-
5
-
You can access it live here - https://graphiql-online.com
6
-
7
-
## Usage of Environment Variables
8
-
9
-
This app uses a few environment variables which are required for development. The production build uses values directly present in index.html serving this app.
10
-
11
-
We use [dotenv](https://github.com/motdotla/dotenv) for setting environment variables for development. Create a `.env` file in the root directory (wherever package.json is) and set the following values. Replace accordingly for testing.
12
-
13
-
```
14
-
PORT=3000
15
-
NODE_ENV=development
16
-
GRAPHQL_ENDPOINT=http://localhost:8090/v1/graphql
17
-
HEADER_STRING='{}'
18
-
VARIABLE_STRING='{}'
19
-
QUERY_STRING='query { test_table { id } }'
20
-
```
21
-
22
-
**Note**
23
-
The .env file should not be in version control.
3
+
[](https://hub.docker.com/r/pokeapi/graphiql)
4
+
[](https://github.com/PokeAPI/graphiql/actions/workflows/docker-image.yml)
24
5
25
6
## Deployment
26
7
8
+
```sh
9
+
npm run build
10
+
npm run serve
27
11
```
28
-
$ npm run build
29
-
```
30
-
31
-
The static assets will be generated in `static` folder. There is an index.html file referencing the css and js assets inside `dist` folder.
32
-
33
-
For a quick Docker based deployment, use `docker build -t graphiql .` && `docker run -d -p 8080:8080 graphiql` for running the production build locally.
34
-
35
-
You can also use now.sh for a cloud deployment. Just simply run `now` to deploy this and get a live URL.
0 commit comments