Skip to content

Commit

Permalink
feedback, add public prefix and remove config
Browse files Browse the repository at this point in the history
  • Loading branch information
teleaziz committed Jan 12, 2022
1 parent ce988af commit cb18d48
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/cms-builder-io/.env.local.example
@@ -1,2 +1,2 @@
# Copy this file as .env.local
BUILDER_PUBLIC_KEY=
NEXT_PUBLIC_BUILDER_API_KEY=
2 changes: 1 addition & 1 deletion examples/cms-builder-io/README.md
Expand Up @@ -33,7 +33,7 @@ cd cms-builder-io-app
builder create -k [private-key] -n [space-name] -d
```

This command when done it'll print your new space's public api key, copy it and add as the value for `BUILDER_PUBLIC_KEY` into the .env files (`.env.production` and `.env.development`)
This command when done it'll print your new space's public api key, copy it and add as the value for `NEXT_PUBLIC_BUILDER_API_KEY` into the .env files (`.env.production` and `.env.development`)

```
BUILDER_PUBLIC_KEY=...
Expand Down
2 changes: 1 addition & 1 deletion examples/cms-builder-io/lib/constants.js
Expand Up @@ -4,7 +4,7 @@ export const CMS_URL = 'https://builder.io/'
export const HOME_OG_IMAGE_URL =
'https://og-image.now.sh/Next.js%20Blog%20example%20with%20**Builder.io**.png?theme=light&md=1&fontSize=100px&images=https%3A%2F%2Fassets.vercel.com%2Fimage%2Fupload%2Ffront%2Fassets%2Fdesign%2Fnextjs-black-logo.svg&images=https%3A%2F%2Fcdn.builder.io%2Fapi%2Fv1%2Fimage%2Fassets%252FYJIGb4i01jvw0SRdL5Bt%252F79c8b61740bc41d5ae722c000ddb5915'
export const BUILDER_CONFIG = {
apiKey: process.env.BUILDER_PUBLIC_KEY,
apiKey: process.env.NEXT_PUBLIC_BUILDER_API_KEY,
postsModel: 'post',
previewSecret: 'micky-mouse',
}
4 changes: 0 additions & 4 deletions examples/cms-builder-io/next.config.js
Expand Up @@ -16,8 +16,4 @@ module.exports = {
},
]
},
env: {
// expose env to the browser
BUILDER_PUBLIC_KEY: process.env.BUILDER_PUBLIC_KEY,
},
}

0 comments on commit cb18d48

Please sign in to comment.