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 app on the Saleor dashboard.
Bruno is an open source tool for exploring and testing APIs. It's similar to Postman or Insomnia.
This app has a collection of requests to Saleor that allows to pay for checkout with NP Atobarai app.
To get started create .env file based on .env.example inside apps/np-atobarai/bruno folder.
DynamoDB is used to store app's configuration. To develop this feature locally use development containers or use docker-compose from .devcontainer:
- Run
docker compose up dynamodbfor local DynamoDB instance - Run
pnpm run setup-dynamodbto describe DynamoDB table
Ensure following env variables are set:
TABLE_NAME=np-atobarai-main-table # must match scripts/setup-dynamodb.ts
AWS_REGION=localhost
AWS_ENDPOINT_URL=http://localhost:8000
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=Alternatively, you can connect to AWS-based DynamoDB:
- Create table in your AWS, based on parameters in
scripts/setup-dynamodb.ts - Set AWS-specific env variables