Medusa is an open-source headless commerce engine that enables developers to create amazing digital commerce experiences.
Prerequisites: To use Medusa Express, you need a Medusa server. Check out medusa-starter-default for a quick setup.
gatsby new medusa-express https://github.com/medusajs/medusa-express-gatsby
# or with npx
npx gatsby new medusa-express https://github.com/medusajs/medusa-express-gatsby
# or via Git
git clone https://github.com/medusajs/medusa-express-gatsby.git medusa-express
cd medusa-express
yarn
# or
npm install
In your project, you should have a .env.template
file with the following content:
GATSBY_MEDUSA_BACKEND_URL=http://localhost:9000
Copy the template into a file used for local development:
mv .env.template .env.development
Your Medusa server runs locally on port 9000 by default. Make sure to update the above environment variable, if you've changed the port.
Start up both your Medusa server and Medusa Express and try it out!
Medusa Express is running at http://localhost:8000
!
Important: Medusa Express requires existing product. Either seed your Medusa server with some dummy products, or create your own through Medusa Admin.