Skip to content

Commit

Permalink
feat: add default env on codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
luizstacio committed Feb 1, 2024
1 parent dfca23a commit 0fc6457
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/graphql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ This is a mock api for block-explorer
pnpm dev
```

## Docker images
## Docker

```
docker run \
-e FUEL_PROVIDER=https://beta-5.fuel.network/graphql \
-e SERVER_PORT=3000 \
-p 3333:3000 \
ghcr.io/fuellabs/fuel-explorer:main
```
4 changes: 3 additions & 1 deletion packages/graphql/codegen.fuel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import type { CodegenConfig } from '@graphql-codegen/cli';

import { requireEnv } from './src/utils/requireEnv';

const { FUEL_PROVIDER } = requireEnv(['FUEL_PROVIDER']);
const { FUEL_PROVIDER } = requireEnv([
['FUEL_PROVIDER', 'https://beta-5.fuel.network/graphql'],
]);

const config: CodegenConfig = {
generates: {
Expand Down

0 comments on commit 0fc6457

Please sign in to comment.