Skip to content

Commit

Permalink
docs: add "auto-start" section
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler36 committed Dec 3, 2024
1 parent 434b1d5 commit ee286ab
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- [Introduction](#introduction)
- [Getting Started](#getting-started)
- [Auto-start the watcher server](#auto-start-the-watcher-server)
- [What does this add-on do?](#what-does-this-add-on-do)
- [Integrations](#integrations)
- [Laravel Mix Configuration](#laravel-mix-configuration)
Expand Down Expand Up @@ -58,6 +59,25 @@ ddev launch :3000

The site should briefly display "Browsersync: connect" in the top right corner, confirming it is connect to the server.

### Auto-start the watcher server

You can use DDEV's `post-start` hook to start the watcher server and launch the page when DDEV starts.

1. Create a `.ddev/config.browsersync-extras.yaml`

```yml
hooks:
post-start:
- exec-host: bash -c "ddev browsersync &"
- exec-host: ddev launch :3000
```
1. Restart DDEV to apply the changes.
```shell
ddev restart
```

## What does this add-on do?

1. Checks to make sure the DDEV version is adequate.
Expand Down

0 comments on commit ee286ab

Please sign in to comment.