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 🙏

© 2024 – Pkg Stats / Ryan Hefner

medusa-starter-default

v0.0.2

Published

A starter for Medusa projects.

Downloads

17

Readme

Prerequisites

This starter has minimal prerequisites and most of these will usually already be installed on your computer.

Setting up your store

  • Install the Medusa CLI
    npm install -g @medusajs/medusa
    yarn global add @medusajs/medusa
  • Create a new Medusa project
    medusa new my-medusa-store
  • Run your project
    cd my-medusa-store
    medusa develop

Your local Medusa server is now running on port 9000.

Seeding your Medusa store


To seed your medusa store run the following command:

medusa seed -f ./data/seed.json

This command seeds your database with some sample datal to get you started, including a store, an administrator account, a region and a product with variants. What the data looks like precisely you can see in the ./data/seed.json file.

Setting up your store with Docker

  • Install the Medusa CLI

    npm install -g @medusajs/medusa-cli
  • Create a new Medusa project

    medusa new my-medusa-store
  • Update project config in medusa-config.js:

    module.exports = {
      projectConfig: {
        redis_url: REDIS_URL,
        database_url: DATABASE_URL, //postgres connectionstring
        database_type: "postgres",
        store_cors: STORE_CORS,
        admin_cors: ADMIN_CORS,
      },
      plugins,
    };
  • Run your project

    When running your project the first time docker compose should be run with the build flag to build your contianer locally:

    docker compose up --build

    When running your project subsequent times you can run docker compose with no flags to spin up your local environment in seconds:

    docker compose up

Your local Medusa server is now running on port 9000.

Seeding your Medusa store with Docker


To add seed data to your medusa store runnign with Docker, run this command in a seperate terminal:

docker exec medusa-server medusa seed -f ./data/seed.json

This will execute the previously described seed script in the running medusa-server Docker container.

Try it out

curl -X GET localhost:9000/store/products | python -m json.tool

After the seed script has run you will have the following things in you database:

  • a User with the email: [email protected] and password: supersecret
  • a Region called Default Region with the countries GB, DE, DK, SE, FR, ES, IT
  • a Shipping Option called Standard Shipping which costs 10 EUR
  • a Product called Cool Test Product with 4 Product Variants that all cost 19.50 EUR

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