Hydrogen v2

R
Renaudil y a 2 jours
0

Description

Hydrogen is Shopify's stack for headless commerce.

npx boilerapp hydrogen-2

文档

Hydrogen v2

This directory is a brief example of a Hydrogen v2 storefront that can be deployed to Vercel with zero configuration.

Deploy Your Own

Deploy with Vercel

Live Example: https://hydrogen-v2-template.vercel.app

You can also deploy using the Vercel CLI:

npm i -g vercel
vercel

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

What's included

  • Remix
  • Hydrogen
  • Oxygen
  • Shopify CLI
  • ESLint
  • Prettier
  • GraphQL generator
  • TypeScript and JavaScript flavors
  • Minimal setup of components and routes

Environment Variables

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.

Local development

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 install
npm run dev

Prix

Gratuit

FREE

评论 (0)

常见问题

常见问题解答 (FAQ)

有问题?我们有答案。如果您找不到想要的答案,请随时联络我们。

Boilerapp 是一个专门用于分享 Boilerplates、入门套件(Starter Kits)和项目模版的开发者社区平台。我们的目标很简单:为您节省初始配置(Setup)的时间,让您可以专注于真正重要的代码。无论您是在寻找简单的代码库还是完整的 SaaS 项目,都能在这里找到。

还有其他问题?

我们的团队随时为您提供帮助。联络我们,我们将尽快回复。