Install Medusa Backend
This document will guide you through setting up your Medusa backend in a three steps.
Prerequisites
Node.js
Medusa supports Node v16 or greater. You can check which version of Node you have by running the following command:
node -v
You can install Node from the official website.
Git
Git is required for this setup. You can find instructions on how to install it from the Set up your dev environment documentation.
Create a Medusa Backend
It is recommended to use Yarn for the installation process as it's much faster than using NPM.
1. Install Medusa CLI
If you run into any errors while installing the CLI tool, check out the troubleshooting guide.
2. Create a new Medusa project
medusa new my-medusa-store --seed
3. Start your Medusa backend
cd my-medusa-store
medusa develop
Test the Backend
After these three steps and in only a couple of minutes, you now have a complete commerce engine running locally. You can test it out by sending a request using a tool like Postman or through the command line:
curl localhost:9000/store/products
Health Route
You can access /health
to get health status of your backend.
Next Steps
Learn about the different resources that your Medusa backend is made of.
Learn about configuring your backend and loading environment variables.