npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

medusajs-launch-utils

v0.0.19

Published

Build and launch utilities for Medusajs monorepo projects

Downloads

9,444

Readme

medusajs-launch-utils

Launch utilities for Medusajs monorepo projects. These utilities streamline the setup and launch process for Medusa.js 2.0 projects by automating backend initialization, health checks, and storefront deployment with proper configuration.

Features

  • Backend Initialization (init-backend)

    • Environment preparation
      • Automatic Meilisearch admin key fetching using master key
      • Environment variable management
      • Persists fetched keys to .env file
    • Running database migrations
    • One-time database seeding
    • One-time admin user creation
  • Backend Ready Check (await-backend)

    • Used to stall Storefront build until backend is ready
    • Progress reporting with elapsed time
  • Storefront Launch (launch-storefront)

    • Supports start, build, and dev commands
    • Automatic Medusa publishable API key fetching
    • Optional Meilisearch integration with key management
    • Configurable port settings
    • Environment variable handling
    • Retry mechanism for API operations

Installation

npm install medusajs-launch-utils

Usage

In your storefront/package.json scripts:

{
  "scripts": {
    "wait": "await-backend",
    "launcher": "launch-storefront",
    "dev": "npm run wait && npm run launcher dev",
    "build": "npm run wait && npm run launcher build",
    "start": "npm run launcher start",
  }
}

In your backend/package.json scripts:

{
  "scripts": {
    "build": "init-backend && medusa build",
    "dev": "init-backend && medusa develop",
    "start": "init-backend && medusa start",
  }
}

Meilisearch Configuration

The backend initialization process includes automatic Meilisearch admin key management:

# Required if not providing admin key directly
MEILISEARCH_HOST=your-meilisearch-host
MEILISEARCH_MASTER_KEY=your-master-key

# Optional - if not set, will be fetched using master key
MEILISEARCH_ADMIN_KEY=your-admin-key

During initialization, if MEILISEARCH_ADMIN_KEY is not provided:

  1. The master key will be used to fetch the admin key from Meilisearch
  2. The admin key will be saved to your .env file
  3. The environment will be prepared before database operations begin

Shared Utilities

The package includes shared utility functions used across different tools:

  • Retry Mechanism
    • Automatic retry for API operations
    • Configurable retry attempts and delays
    • Used by both storefront and backend utilities

These utilities are particularly useful when working with Medusa.js 2.0 monorepo setups. For a comprehensive guide on Medusa.js 2.0 features and deployment strategies, check out this detailed overview of Medusa.js 2.0.

Documentation

For more detailed usage instructions, please refer to:


Developed by https://funkyton.com/ | Making open-source effortless for everyone