Skip to content

Commit

Permalink
improve md
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Jun 6, 2024
1 parent 143eca4 commit 1389ecf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
16 changes: 8 additions & 8 deletions docs/recipes/event-gateways-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
]
}
-->
## How does an Event Gateway work?
# How does an Event Gateway work?

An event gateway is a background process that continuously runs.

Expand All @@ -26,11 +26,11 @@ This looping and sleeping does not count for all types of event gateways. For ex

This "doing what it is designed for" will be explained in more detail underneath.

## Which gateways are available?
# Which gateways are available?

Lucee comes with 2 gateways: a Directory watcher and a Mail watcher.

### Directory watcher
## Directory watcher

This event gateway checks a given directory for file changes. These changes (events) can be:

Expand All @@ -44,7 +44,7 @@ Please note that the files in this first snapshot are NOT seen as changes!

So if you already have some files in the directory you want to watch, these files are not seen as "new file" when the gateway starts. Also, when Lucee (or your whole server) restarts, any changes which happened within this time are not seen and will not be picked up when the Directory watcher starts up again.

### Filters
## Filters

You can apply filters for what you exactly want to watch changes for:

Expand All @@ -53,11 +53,11 @@ You can apply filters for what you exactly want to watch changes for:

Note: the Extensions setting might be changed in the near future, due to an enhancement request.

### Mail watcher
## Mail watcher

This gateway checks a given POP mailbox for new mail. Since it only checks for new mail, it is rather limited in what it can do, but this is what makes it fast. The Mail watcher will read the inbox, and then check all the emails found.

### Logs
## Logs

Make sure you regularly check the logs, because when anything goes wrong, Lucee will report this in its logs.

Expand Down Expand Up @@ -90,7 +90,7 @@ For example, the above code would crash if a file with the same name already exi

It might be even wiser to just email the complete error dump, so you will be semi-instantly notified of any errors.

### Using cfadmin with Event gateways
## Using cfadmin with Event gateways

Instead of using the server/web admin, you can also use Lucee's `<cfadmin>` tag.

Expand All @@ -116,7 +116,7 @@ Add or update a gateway instance:
/>
```

### Remove a gateway instance
## Remove a gateway instance

```lucee
<cfadmin action="removeGatewayEntry" type="server" password="server-admin-password"
Expand Down
12 changes: 6 additions & 6 deletions docs/recipes/filesystem-mapping-define-mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
]
}
-->
## How to define a regular Mapping
# How to define a regular Mapping

Lucee allows you to define a mapping to a specific location in a filesystem, so you don't always have to use the full path. In most cases, the full path is not working anyway, for example with [tag-include] which does not work with a full path.

This is supported with all the various [lucee-resources] supported (local, ftp, http, ram, zip, s3, etc.).

## Create a regular Mapping in the Administrator
# Create a regular Mapping in the Administrator

The most common way to define a regular mapping is in the Lucee Server or Web Administrator.

Expand All @@ -53,7 +53,7 @@ In that case, Lucee first checks the archive associated with the "/myMapping" ma

"Inspect templates" defines the re-check interval for the physical paths.

### Using the Mapping
## Using the Mapping

Now you can use that mapping in your code:

Expand All @@ -62,7 +62,7 @@ Now you can use that mapping in your code:
<cfset cfc = new shop.Whatever()> <!--- load a CFC from the "shop" mapping (see also "this.componentpaths" for handling components) --->
```

## Advanced
# Advanced

In the previous example, we simply set a path. As you can see in the Administrator, a mapping can contain more data than only a physical path. Of course, you can use these settings also with a mapping done in the [tag-application].

Expand All @@ -87,7 +87,7 @@ In that case, we not only define a physical path but also a Lucee archive (.lar)

In that case, Lucee first checks in the archive for "whatever.cfm". If not found there, it looks inside the physical path.

### Side Note
## Side Note

Of course, this can be done for all mapping types:

Expand All @@ -99,7 +99,7 @@ component {
}
```

### See Also
## See Also

- [Forcing Lucee to re-check the physical paths of application defined mappings without a restart](https://blog.simplicityweb.co.uk/123/forcing-lucee-to-re-check-the-physical-paths-of-application-defined-mappings-without-a-restart)
- [Confusion Over this.mappings And expandPath() Not Working In Lucee](https://www.bennadel.com/blog/3718-confusion-over-this-mappings-and-expandpath-not-working-in-lucee-cfml-5-3-3-62.htm)

0 comments on commit 1389ecf

Please sign in to comment.