Skip to content

Commit c36b0e7

Browse files
committed
docs: update env setup
1 parent f4a8c7b commit c36b0e7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

apps/matching-service/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ cd ./apps/matching-service
2222
go mod tidy
2323
```
2424

25-
3. Start the WebSocket server:
25+
3. Create a copy of the `.env.example` file as an `.env` file with the following environment variables:
26+
27+
- `PORT`: Specifies the port for the WebSocket server. Default is `8081`.
28+
- `JWT_SECRET`: The secret key used to verify JWT tokens.
29+
- `MATCH_TIMEOUT`: The time in seconds to wait for a match before timing out.
30+
31+
4. Start the WebSocket server:
2632

2733
```bash
2834
go run main.go
@@ -88,12 +94,6 @@ If no match is found after a set period of time, the server will send a timeout
8894

8995
If the server encounters an issue during the WebSocket connection or processing, the connection will be closed without any error message. The client should treat the unexpected closing as an error.
9096

91-
### Environment Variables
92-
93-
- `PORT`: Specifies the port for the WebSocket server. Default is `8081`.
94-
- `JWT_SECRET`: The secret key used to verify JWT tokens.
95-
- `MATCH_TIMEOUT`: The time in seconds to wait for a match before timing out.
96-
9797
## Testing
9898

9999
Utilize `./tests/websocket-test.html` for a basic debugging interface of the matching service. This HTML file provides an interactive way to test the WebSocket connection, send matching requests, and observe responses from the server.

0 commit comments

Comments
 (0)