Giter Club home page Giter Club logo

medusa-plugin-strapi's Introduction

Medusa Medusa

Medusa Strapi Plugin

Medusa is released under the MIT license. PRs welcome! Discord Chat Follow @medusajs

Setting up your store

  • Initialize a medusa project by using a starter

    yarn create medusa-app
            OR
    npx create-medusa-app
    
  • Choose medusa-starter-default

    ? Which Medusa starter would you like to install? …
    ❯ medusa-starter-default
      medusa-starter-contentful
      Other
    
  • Pick any storefront starter

    Which storefront starter would you like to install? …
    ❯ Gatsby Starter
    Next.js Starter
    None
    
  • Make sure redis is installed and running

    $ redis-cli
    127.0.0.1:6379> ping
    PONG
    
  • Go to backend directory.

    cd <Your project name>/backend
    
  • Make sure your packages version in package.json match this -

      "@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 medusa-config.js. Navigate to the end of file and make sure this line is not commented out -

    redis_url: REDIS_URL,
    
  • In the same file, add this object to plugins array -

    {
      resolve: `medusa-plugin-strapi`,
      options: {
      strapi_token: 'token', // see https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/optional/api-tokens.html for more information
      strapi_url: 'http://localhost:1337'
      }
    }
    
  • Create and navigate to plugins directory and pull medusa-plugin-strapi

    cd plugins
    git clone https://github.com/Deathwish98/medusa-plugin-strapi.git
    
  • Install dependencies and build project files

    cd medusa-plugin-strapi
    npm install
    npm run build
    
  • Start medusa server from backend directory

    cd ../../
    npm run seed
    npm 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 -

https://strapi.io/documentation/developer-docs/latest/getting-started/quick-start.html

  • Create a new strapi project using our template.

    npx [email protected] strapi-medusa --template https://github.com/Deathwish98/strapi-medusa-template.git
    
    OR
    
    yarn create strapi-app strapi-medusa --template https://github.com/Deathwish98/strapi-medusa-template.git
    
  • Start strapi server.

    npm run develop <---- For development purposes
    
    OR
    
    npm run start
    

    NOTE: If you are using SQLite there is a known knex.js bug -

    error KnexTimeoutError: Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?
    

    It appears after running npm run develop for the first time . Just run the command again and it should disappear.

Visit docs.medusa-commerce.com for further guides.

Website | Notion Home | Twitter | Docs

medusa-plugin-strapi's People

Contributors

sharmapawan11 avatar glassesjacketshirtman avatar shahednasser avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.