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.js
file in the root directory using our template;cd medusa-svelte-starter/ mv creds.template.js creds.js
If you are using Stripe, add your Stripe API key to the
creds.js
file using the format below.export const STRIPE_KEY='pk_test_something'
Note: The
creds.js
file has been included in the.gitignore
file, 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.svelte
file to see your site update in real-time! -
Learn more about Medusa
-
Learn more about Svelte