frandiox / hydrogen-vercel-serverless

Deploy a Hydrogen storefront to Vercel Serverless Functions

Home Page:https://hydrogen-vercel-serverless-frandiox.vercel.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hydrogen App in Vercel Serverless Function

Hydrogen is a React framework and SDK that you can use to build fast and dynamic Shopify custom storefronts.

Check out the docs

Getting started

Requirements:

  • Node.js version 16.5.0 or higher
  • Yarn
yarn
yarn dev

Remember to update shopify.config.js with your shop's domain and Storefront API token!

Vercel project

Link this directory to a Vercel project and set the following configuration in Vercel Dashboard:

  • Output directory: set it to dist/client.
  • Build command: set it to override: true and leave it empty to skip cloud build.

Building for production

Build for production with the following command:

yarn build

This generates a Vercel Serverless Function that is consumed in api/index.js.

About

Deploy a Hydrogen storefront to Vercel Serverless Functions

https://hydrogen-vercel-serverless-frandiox.vercel.app/


Languages

Language:JavaScript 98.1%Language:CSS 1.6%Language:HTML 0.3%