Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@medusajs/medusa-js

Package Overview
Dependencies
Maintainers
2
Versions
837
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@medusajs/medusa-js

Client for Medusa Commerce Rest API

  • 1.0.6-next.1518
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
19K
decreased by-2.49%
Maintainers
2
Weekly downloads
 
Created
Source

Medusa JS Client

Version

The Medusa JS Client provides easy access to the Medusa API from a client written in Typescript.

Documentation

See our API reference.

Installation

Install the package with:

npm install @medusajs/medusa-js
# or
yarn add @medusajs/medusa-js

Usage

Import Medusa as a default import and initiate it:

import Medusa from '@medusajs/medusa-js';

const medusa = new Medusa();

const { cart } = await medusa.carts.create({});

Configuration

Initialize with config object

The package can be initialized with several options:

const medusa = new Medusa({
  maxRetries: 3,
  baseUrl: 'https://api.example.com',
});
OptionDefaultDescription
maxRetries0The amount of times a request is retried.
baseUrl'http://localhost:9000'The url to which requests are made to

FAQs

Package last updated on 08 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc