This directory is a brief example of a Hydrogen v2 storefront that can be deployed to Vercel with zero configuration.
Live Example: https://hydrogen-v2-template.vercel.app
You can also deploy using the Vercel CLI:
npm i -g vercelvercel
Hydrogen is Shopify’s stack for headless commerce. Hydrogen is designed to dovetail with Remix, Shopify’s full stack web framework. This template contains a minimal setup of components, queries and tooling to get started with Hydrogen.
Check out Hydrogen docs Get familiar with Remix
Using Hydrogen requires a few environment variables to be set in order to properly connect to Shopify. For this template, the minimal set of environment variables are defined in the vercel.json
file, which will be applied to the deployment when deployed to Vercel. However, you should migrate these default environment variables to your Project's Environment Variables configuration in the Vercel dashboard (or using the vc env
commands), and update them according to your needs (also change the SESSION_SECRET
to your own value). Once that is done, delete the vercel.json
file from your project to prevent the environment variables defined there from taking precedence.
Rename the .env.example
file to .env
in order for the Shopify dev server to use those environment variables during local development. If you defined/modified additional environment variables based on the section above, be sure to apply those changes in your .env
file as well.
Then run the following commands:
npm installnpm run dev
This directory is a brief example of a Hydrogen v2 storefront that can be deployed to Vercel with zero configuration.
Live Example: https://hydrogen-v2-template.vercel.app
You can also deploy using the Vercel CLI:
npm i -g vercelvercel
Hydrogen is Shopify’s stack for headless commerce. Hydrogen is designed to dovetail with Remix, Shopify’s full stack web framework. This template contains a minimal setup of components, queries and tooling to get started with Hydrogen.
Check out Hydrogen docs Get familiar with Remix
Using Hydrogen requires a few environment variables to be set in order to properly connect to Shopify. For this template, the minimal set of environment variables are defined in the vercel.json
file, which will be applied to the deployment when deployed to Vercel. However, you should migrate these default environment variables to your Project's Environment Variables configuration in the Vercel dashboard (or using the vc env
commands), and update them according to your needs (also change the SESSION_SECRET
to your own value). Once that is done, delete the vercel.json
file from your project to prevent the environment variables defined there from taking precedence.
Rename the .env.example
file to .env
in order for the Shopify dev server to use those environment variables during local development. If you defined/modified additional environment variables based on the section above, be sure to apply those changes in your .env
file as well.
Then run the following commands:
npm installnpm run dev