Skip to content

Commit 213f3fe

Browse files
committed
Update README.md
add documentation for local development
1 parent 0299006 commit 213f3fe

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
# Letter Box
22

3+
## Development of the client with proxied API
4+
5+
For local development using a remote API server, configure the proxy settings in your local environment:
6+
7+
1. Create or edit `code/client/.env.development.local`
8+
2. Set the following variables:
9+
10+
- `VITE_PROXY_API_TARGET`: Point to your API server
11+
- `VITE_GRAPHQL_SCHEMA_URL`: Point to the `/graphql` endpoint
12+
13+
```bash
14+
cd code/client
15+
npm install
16+
npm run dev-client
17+
```
18+
19+
Defaults value are:
20+
21+
```env
22+
VITE_PROXY_API_TARGET=http://localhost:3000
23+
VITE_GRAPHQL_SCHEMA_URL=http://localhost:4000/graphql
24+
```
25+
26+
This setup allows you to develop the client while connecting to a remote API instance.
27+
328
## Production with docker
429

530
To deploy for production one can use docker in prod mode.

0 commit comments

Comments
 (0)