You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The easiest way of running Saleor for local development is to use [development containers](https://containers.dev/).
24
+
If you have Visual Studio Code follow their [guide](https://code.visualstudio.com/docs/devcontainers/containers#_quick-start-open-an-existing-folder-in-a-container) on how to open existing folder in container.
25
+
26
+
Development container only creates container, you still need to start the server. See [common-commands](#common-commands) section to learn more.
27
+
28
+
Development container will have two ports opened:
29
+
30
+
1.`3000` - were AvaTax app dev server will listen to requests
31
+
2.`8000` - were local DynamoDB will listen to requests and allow [NoSQL Workbench for DynamoDB](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/workbench.html) to connect
32
+
33
+
### Common commands
34
+
35
+
Running app in development server:
36
+
37
+
```shell
38
+
pnpm run dev
39
+
```
40
+
41
+
Running tests:
22
42
23
-
Visit [AvaTax App documentation](https://docs.saleor.io/docs/3.x/developer/app-store/apps/avatax/overview) to learn how to configure and develop the app locally.
43
+
```shell
44
+
pnpm run test
45
+
```
24
46
25
-
###DynamoDB
47
+
## DynamoDB
26
48
27
-
DynamoDB is used to store Client-side logs. To develop this feature locally:
49
+
DynamoDB is used to store Client-side logs. To develop this feature locally use development containers or use [docker-compose](../../.devcontainer/avatax/docker-compose.yml) from `.devcontainer`:
28
50
29
51
1. Run `docker compose up` for local DynamoDB instance
30
-
2. Run `bash scripts/setup-dynamodb.sh` to describe DynamoDB table
52
+
2. Run `./scripts/setup-dynamodb.sh` to describe DynamoDB table
31
53
32
54
Ensure following env variables are set
33
55
34
56
```dotenv
35
-
FF_ENABLE_EXPERIMENTAL_LOGS=true
36
57
DYNAMODB_LOGS_ITEM_TTL_IN_DAYS=30
37
58
DYNAMODB_LOGS_TABLE_NAME=avatax-client-logs # must match scripts/setup-dynamodb.sh
38
59
```
39
60
40
61
Alternatively, you can connect to AWS-based DynamoDB:
41
62
42
-
1. Create table in your AWS, based on parameters in `scripts/setup-dynamodb.sh`
63
+
1. Create table in your AWS, based on parameters in [`scripts/setup-dynamodb.sh`](./scripts/setup-dynamodb.sh)
43
64
2. Set AWS-specific [env variables](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/loading-node-credentials-environment.html)
44
65
45
-
If `FF_ENABLE_EXPERIMENTAL_LOGS` is not set, you don't have to provide anything - feature will be disabled
46
-
47
66
## Testing
48
67
49
68
### E2E tests
@@ -119,7 +138,7 @@ PROMO_CODE=
119
138
120
139
The app has an example environment for `localhost` in `environments/localhost.bru`. You can copy it to bootstrap your own environment e.g `cloud.bru` (which will be ignored by git).
121
140
122
-
###Webhook migration scripts
141
+
## Webhook migration scripts
123
142
124
143
> [!NOTE]
125
144
> This section refers to apps hosted by Saleor or using REST APL. If you self host AvaTax app you need to write your own logic for updating migration scripts.
@@ -139,16 +158,6 @@ To start the migration run command:
139
158
pnpm migrate
140
159
```
141
160
142
-
### Running the app in docker
143
-
144
-
To run the app in docker, you need to build the image first (run this command in the root directory of the monorepo):
0 commit comments