1. Start
  2. An entity
  3. A source
  4. A rule
  5. A port
  6. A link
  7. A fact
  8. An app
  9. Split

Mail in its own process

Mail is slow, so we run it in its own process. Only where it runs changes, not the code.

fougere.config.ts
1import '@fougere/adapter-rest';
2import '@fougere/adapter-sql';
3import { defineFougere } from '@fougere/core';
4
5export default defineFougere({
6 protocols: { rest: {} },
7 sources: { main: { type: 'sqlite', path: '.data/blog.db' } },
+ fronds: {
+ '@fougere/log': {},
+ mail: { remote: 'http://127.0.0.1:4100' },a b c d
+ },
12});

point at a lettered line, or tap it, to see what grows from it

0 line changed under fronds/

Your code says what a thing is. One line of config says where it runs.

Try it
$ npx fougere dev mail   # then publish from localhost:3000/posts
INF [app:mail:AuditMailer] (mail:MailHandler.onPublished) sending Published: Hi
Built with Fougere and Nuxt, hosted on GitHub Pages.