Medusa Strapi Plugin
Setting up your store
- Initialize a
project by using a starterCopy to clipboardmedusa
123yarn create medusa-appORnpx create-medusa-app - ChooseCopy to clipboard
medusa-starter-default
1234? Which Medusa starter would you like to install? …❯ medusa-starter-defaultmedusa-starter-contentfulOther - Pick any storefront starter1234Which storefront starter would you like to install? …❯ Gatsby StarterNext.js StarterNone
- Make sure
is installed and runningCopy to clipboardredis
123$ redis-cli127.0.0.1:6379> pingPONG - Go to backend directory.1cd <Your project name>/backend
- Make sure your packages version in
match this -Copy to clipboardpackage.json
12345678"@medusajs/medusa": "^1.1.49","@medusajs/medusa-cli": "^1.1.22","medusa-fulfillment-manual": "^1.1.26","medusa-interfaces": "^1.1.27","medusa-payment-manual": "^1.0.8","medusa-payment-stripe": "^1.1.30","mongoose": "^5.13.3","typeorm": "^0.2.36" - Edit
. Navigate to the end of file and make sure this line is not commented out -Copy to clipboardmedusa-config.js
1redis_url: REDIS_URL, - In the same file, add this object to plugins array -123456789{resolve: `medusa-plugin-strapi`,options: {strapi_medusa_user: 'medusa_user',strapi_medusa_password: 'medusaPassword1',strapi_url: '127.0.0.1',strapi_port: '1337'}}
- Create and navigate to
directory and pullCopy to clipboardplugins
Copy to clipboardmedusa-plugin-strapi
12cd pluginsgit clone https://github.com/Deathwish98/medusa-plugin-strapi.git - Install dependencies and build project files123cd medusa-plugin-strapinpm installnpm run build
- Start medusa server from
directoryCopy to clipboardbackend
123cd ../../npm run seednpm run start
Your local Medusa server should now be running on port 9000.
Setting up strapi
This plugin assumes that you are familiar with strapi. If you have not used it before, visit the official docs for more info -
- Create a new strapi project using our template.12345npx create-strapi-app@3.6.8 strapi-medusa --template https://github.com/Deathwish98/strapi-medusa-template.gitORyarn create strapi-app strapi-medusa --template https://github.com/Deathwish98/strapi-medusa-template.git
- Start strapi server.12345npm run develop <---- For development purposesORnpm run startNOTE: If you are using
there is a knownCopy to clipboardSQLite
bug -Copy to clipboardknex.js
1error KnexTimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?It appears after running
for the first time . Just run the command again and it should disappear.Copy to clipboardnpm run develop
Visit docs.medusa-commerce.com for further guides.
