Hydrogen v2

R
Renaudil y a 2 jours
0

Description

Hydrogen is Shopify's stack for headless commerce.

npx boilerapp hydrogen-2

Documentation

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

Commentaires (0)

FAQ

Questions Fréquemment Posées

Vous avez une question ? Nous avons les réponses. Si vous ne trouvez pas ce que vous cherchez, n'hésitez pas à nous contacter.

Boilerapp est une plateforme communautaire dédiée au partage de boilerplates, de starter kits et de modèles de projets pour développeurs. Notre objectif est simple : vous faire gagner du temps sur la configuration initiale (setup) pour que vous puissiez coder ce qui compte vraiment. Que vous cherchiez une simple base de code ou un projet SaaS complet, vous le trouverez ici.

Vous avez d'autres questions ?

Notre équipe est là pour vous aider. Contactez-nous et nous vous répondrons dès que possible.