Important
You can use the devcontainer Dockerfile and docker-compose.yaml directly - but remember to run pnpm install manually
The easiest way to run Saleor for local development is to use development containers. If you have Visual Studio Code, follow their guide on how to open an existing folder in a container.
The development container only creates a container; you still need to start the server.
The development container will have two ports opened:
3000- where the app dev server will listen for requests
- Install the dependencies by running the following command in the shell:
pnpm install-
Create a file named
.envand use the contents of the.env.examplefile as a reference. -
Start the development server by running the following command in the shell:
pnpm dev- The app will be available under
http://localhost:3000.
Note
To install app in Saleor Cloud, you need to expose your local server to the internet (tunnel). You can use Saleor CLI to do that. See this guide for more details.
- Install the app on the Saleor dashboard.
To run integration tests:
- Create a file named
.env.testand use the contents of the.env.test.examplefile as a reference. - Change the values of
INTEGRATION_*variables - Run tests:
pnpm run test:integrationTests are using mocked Saleor and local DynamoDB in Docker but are calling the real Stripe API.
To run e2e tests:
- Create a file named
.env.testand use the contents of the.env.test.examplefile as a reference. - Change the values of
E2E_*variables - Run tests:
pnpm run test:e2eTests are using the Stripe staging app that is already installed on Saleor environments.