Skip to content

Commit

Permalink
refactor: unify name of starter variables for Vercel deployments (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
Martian2Lee authored Sep 2, 2022
1 parent 72ae952 commit b3d252e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .env.local.example
Original file line number Diff line number Diff line change
@@ -1 +1 @@
NEXT_PUBLIC_GRAPHCMS_URL=
HYGRAPH_ENDPOINT=
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
.next/
node_modules/
.vercel
.idea
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[Demo](https://marketing-websites.withheadlesscms.com/)

[![Clone project](https://hygraph.com/button)](https://app.graphcms.com/clone/5f2c35155b33496999b9467afe88b34f?name=Marketing%20Website)
[![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)
[![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)

## Quick start

Expand All @@ -28,7 +28,7 @@ cp .env.local.example .env.local
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).

```env
NEXT_PUBLIC_GRAPHCMS_URL=
HYGRAPH_ENDPOINT=
```

3. **Start building!**
Expand Down
2 changes: 1 addition & 1 deletion lib/_client.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { GraphQLClient } from 'graphql-request'

const hygraphClient = (preview = false) =>
new GraphQLClient(process.env.NEXT_PUBLIC_GRAPHCMS_URL, {
new GraphQLClient(process.env.HYGRAPH_ENDPOINT, {
headers: {
...(process.env.GRAPHCMS_TOKEN && {
Authorization: `Bearer ${
Expand Down

1 comment on commit b3d252e

@vercel
Copy link

@vercel vercel bot commented on b3d252e Sep 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.