Skip to content

Commit b3d252e

Browse files
authored
refactor: unify name of starter variables for Vercel deployments (#186)
1 parent 72ae952 commit b3d252e

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

.env.local.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
NEXT_PUBLIC_GRAPHCMS_URL=
1+
HYGRAPH_ENDPOINT=

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
.next/
55
node_modules/
66
.vercel
7+
.idea

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[Demo](https://marketing-websites.withheadlesscms.com/)
66

77
[![Clone project](https://hygraph.com/button)](https://app.graphcms.com/clone/5f2c35155b33496999b9467afe88b34f?name=Marketing%20Website)
8-
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FGraphCMS%2Freference-marketing-website&env=NEXT_PUBLIC_GRAPHCMS_URL&envDescription=Your%20GraphCMS%20API%20endpoint&envLink=https%3A%2F%2Fgraphcms.com%2Fdocs%2Fapi-reference%2Fbasics%2Fenvironments%23environment-endpoints&demo-title=GraphCMS%20Marketing%20Site%20Reference&demo-description=A%20Next.js%20starter%20for%20creating%20a%20SaaS%20Marketing%20Website%20with%20GraphCMS&demo-url=https%3A%2F%2Fmarketing-websites.withheadlesscms.com%2F&demo-image=https%3A%2F%2Fmedia.graphcms.com%2F0GnTWzWbRBSQzoDQs8R3)
8+
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FGraphCMS%2Freference-marketing-website&env=HYGRAPH_ENDPOINT&envDescription=Your%20GraphCMS%20API%20endpoint&envLink=https%3A%2F%2Fgraphcms.com%2Fdocs%2Fapi-reference%2Fbasics%2Fenvironments%23environment-endpoints&demo-title=GraphCMS%20Marketing%20Site%20Reference&demo-description=A%20Next.js%20starter%20for%20creating%20a%20SaaS%20Marketing%20Website%20with%20GraphCMS&demo-url=https%3A%2F%2Fmarketing-websites.withheadlesscms.com%2F&demo-image=https%3A%2F%2Fmedia.graphcms.com%2F0GnTWzWbRBSQzoDQs8R3)
99

1010
## Quick start
1111

@@ -28,7 +28,7 @@ cp .env.local.example .env.local
2828
Inside of your newly created `.env.local` file, provide values for the variable. These variables can be found in the [project settings UI](https://hygraph.com/docs/guides/concepts/apis#working-with-apis).
2929

3030
```env
31-
NEXT_PUBLIC_GRAPHCMS_URL=
31+
HYGRAPH_ENDPOINT=
3232
```
3333

3434
3. **Start building!**

lib/_client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { GraphQLClient } from 'graphql-request'
22

33
const hygraphClient = (preview = false) =>
4-
new GraphQLClient(process.env.NEXT_PUBLIC_GRAPHCMS_URL, {
4+
new GraphQLClient(process.env.HYGRAPH_ENDPOINT, {
55
headers: {
66
...(process.env.GRAPHCMS_TOKEN && {
77
Authorization: `Bearer ${

0 commit comments

Comments
 (0)