From e5553e56fb96e278996085f31f120b59503080ed Mon Sep 17 00:00:00 2001 From: nzambello Date: Mon, 4 Aug 2025 10:21:01 +0200 Subject: [PATCH] fix readme docker compose commands --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index b83bd09..331af86 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ A simple NATS client/server setup for testing message publishing and subscribing ### 1. Start the NATS server and message subscriber ```bash -docker-compose up nats server -d +docker compose up nats server ``` This starts: @@ -29,7 +29,7 @@ This starts: ### 2. Run the interactive client ```bash -docker-compose run --rm client +docker compose run --rm client ``` This opens an interactive prompt where you can: @@ -43,13 +43,13 @@ This opens an interactive prompt where you can: To see incoming messages in real-time: ```bash -docker-compose logs -f server +docker compose logs -f server ``` ### 4. Stop everything ```bash -docker-compose down +docker compose down ``` ## Example Usage @@ -57,13 +57,13 @@ docker-compose down 1. **Terminal 1**: Start the infrastructure ```bash - docker-compose up nats server -d + docker compose up nats server -d ``` 2. **Terminal 2**: Run the client ```bash - docker-compose run --rm client + docker compose run --rm client ``` You'll see: @@ -78,7 +78,7 @@ docker-compose down 3. **Terminal 1**: Check server logs to see received messages ```bash - docker-compose logs server + docker compose logs server ``` ## Local Development (without Docker) @@ -115,8 +115,8 @@ bun run client.ts ## Troubleshooting -- **Client not accepting input**: Make sure you're using `docker-compose run --rm client` instead of `docker-compose up client` +- **Client not accepting input**: Make sure you're using `docker compose run --rm client` instead of `docker compose up client` - **Connection refused**: Ensure NATS server is running first -- **Messages not appearing**: Check that the server container is running with `docker-compose ps` +- **Messages not appearing**: Check that the server container is running with `docker compose ps` This project was created using `bun init` in bun v1.2.18. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.