Hydrogen is a React framework and Software Development Kit (SDK) that can be used to build fast and dynamic custom Shopify storefronts.
This template will show you how to create a sample custom storefront that can be hosted on Netlify.
Requirements:
- Node.js version 16.5.0 or higher
-
Clone the repositoritory to your computer:
git clone https://github.com/netlify/hydrogen-netlify-starter
-
Navigate to the repostitory folder:
cd hydrogen-netlify-starter
-
Update
hydrogen.config.js
with your shop's domain (replace thestoreDomain
sample value) and Storefront API token (replace thestorefrontToken
sample value). -
Install the package dependencies:
npm install
-
Start the application:
npm run dev
To build a production-ready instance of the application, run the following command:
npm run build
To run a local preview of your Hydrogen app in an environment similar to Netlify:
-
Build your Hydrogen app:
npm run build
-
Run the preview command:
npm run preview
If you found an issue with the code in this repository, feel free to open an issue or let us know in the Netlify Forums.