Medusa is an open-source headless commerce engine that enables developers to create amazing digital commerce experiences.
Prerequisites: To use the starter you should have a Medusa server running locally on port 9000. Check out medusa-starter-default for a quick setup.
-
Setting up the environment
Navigate into your projects directory and create a
creds.jsfile in the root directory using our template;cd medusa-svelte-starter/ mv creds.template.js creds.jsIf you are using Stripe, add your Stripe API key to the
creds.jsfile using the format below.export const STRIPE_KEY='pk_test_something'
Note: The
creds.jsfile has been included in the.gitignorefile, hence, it will not be included in your version control. -
Install dependencies
Use Yarn to install all dependencies.
yarn install
-
Start developing.
Start up the local development server.
yarn dev
-
Open the code and start customizing!
Your site is now running at http://localhost:8000!
Edit the
src/routes/Home.sveltefile to see your site update in real-time! -
Learn more about Medusa
-
Learn more about Svelte