Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
medeirosinacio committed Jul 8, 2024
1 parent b8464ac commit 83e32b7
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 5 deletions.
36 changes: 32 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,24 @@ replace, and delete events.
- PHP >= 8.2
- MongoDB PHP Driver
- MongoDB server with replica set configured (for change streams)
- Docker

## Installation

1. Clone the repository:
1. Clone and navigate to the project directory:

```bash
git clone https://github.com/your-username/php-mongo-ttl-index-change-stream-listener-example.git
cd php-mongo-ttl-index-change-stream-listener-example
```

2. Install dependencies:
2. Start the project via make file setup command:

```bash
composer install
make setup
```

3. Configure MongoDB connection in `MongoStreamListenerCommand.php`.
This command will install the project dependencies and set up the database via Docker.

## Usage

Expand All @@ -42,6 +44,32 @@ php bin/console dev:mongo-stream-listener

![](docs/assets/README-1720454397217.png)

Now all changes in the `records` collection will be displayed in the console output.

## Explore

Use make command to see all available commands:

```bash
> make

Usage: make [command]

Commands available:
check-docker Check if Docker is installed
ci Run the CI pipeline
database-cleanup Cleanup the database
database-migrate Migrate the database
database-seed Create a new record in the database
help Show this help message
install-dependencies Install the project dependencies
mongo-stream-listener Start the MongoDB stream listener
playground Start a PHP playground dockerized environment
setup Setup the project
setup-database Setup the database
test Run the tests
```
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
1 change: 0 additions & 1 deletion TODO.md

This file was deleted.

0 comments on commit 83e32b7

Please sign in to comment.