-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding draft content for reference landing page (#828)
- Loading branch information
Showing
6 changed files
with
139 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# These API credentials fetch example inventory from the Hydrogen Demo Store | ||
# https://hydrogen.shop | ||
# | ||
# Replace with your own store domain and Storefront API token | ||
|
||
SESSION_SECRET="foobar" | ||
PUBLIC_STOREFRONT_API_TOKEN="3b580e70970c4528da70c98e097c2fa0" | ||
PUBLIC_STOREFRONT_API_VERSION="2023-04" | ||
PUBLIC_STORE_DOMAIN="hydrogen-preview.myshopify.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* server.js | ||
* --------- | ||
* Create a storefront client. | ||
* Check the server.js file in the root of your new Hydrogen project to see | ||
* an example implementation of this function. If you start from an official | ||
* Hydrogen template (Hello World or Demo Store), then the client is already | ||
* set up for you. Update the Shopify store domain and API token to start | ||
* querying your own store inventory. | ||
*/ | ||
const {storefront} = createStorefrontClient({ | ||
cache, | ||
waitUntil, | ||
i18n: {language: 'EN', country: 'US'}, | ||
publicStorefrontToken: env.PUBLIC_STOREFRONT_API_TOKEN, | ||
privateStorefrontToken: env.PRIVATE_STOREFRONT_API_TOKEN, | ||
storeDomain: `https://${env.PUBLIC_STORE_DOMAIN}`, | ||
storefrontApiVersion: env.PUBLIC_STOREFRONT_API_VERSION || '2023-04', | ||
storefrontId: env.PUBLIC_STOREFRONT_ID, | ||
storefrontHeaders: getStorefrontHeaders(request), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import {ShopPayButton} from '@shopify/hydrogen'; | ||
|
||
export function renderShopPayButton({variantId, storeDomain}) { | ||
return <ShopPayButton variantIds={[variantId]} storeDomain={storeDomain} />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
npm create @shopify/hydrogen@latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
yarn create @shopify/hydrogen |