This is a super opinionated environment for development of the MedusaJS backend.
You will need VS Code and Docker.
Make sure you understand how to use Dev Containers in VS Code.
- Clone this repo (or fork it - or whatever you want).
- Open it with VS Code
- Build the dev container
If you use the default .env
file:
The backend, when started with yarn start
will be listening on 3000
The admin inteface which starts automatically, will be listening on 9000
Meilisearch is listening on 7700
Inside your development environment, all the services have a unique hostname. So, the backend will talk to the database via the db
hostname, and the redis server via redis
.
Outside of the development environment (ie your web browser) the services are all exposed as ports on localhost.
Assuming you keep the default .env config.
Started by opening a terminal and running yarn start
.
Browser http://localhost:3000/
Dev Environment http://app:3000/
Browser http://localhost:9000/
Dev Environment http://admin:9000/
Browser http://localhost:7700/
Dev Environment http://meilisearch:7700/
Connect to the postgres database using db
as the host, not localhost as Adminer is inside the docker environment.
Your Machine postgres://postgres:postgres@localhost:5432/medusa
Dev Environment postgres://postgres:postgres@db:5432/medusa
Your Machine redis://localhost
Dev Environment redis://redis
Please feel free to create PR's to clean up the config, or the documentation.