0.5.0 • Published 3 years ago
@spacefill/gibbon-mail v0.5.0
Gibbon-mail - Backend
Send mails with mjml Template and JSON Schema.
- Project status: POC
- Screencast: https://youtu.be/9oih7cZTjk4
- Docker Image: https://hub.docker.com/r/stephaneklein/gibbon-mail (Automated Builds configured on
masterbranch)
To generate PDF instead send mails, see this project: gibbon-pdf
Quick start
You can use gibbon-mail as a standalone app:
$ npm install -g @spacefill/gibbon-mail
$ gibbon-mailor as library:
const { createApp } = require('@spacefill/gibbon-mail')
const app = createApp()
const server = app.listen(
5000,
'0.0.0.0',
() => {
console.log(`Server listening on port: 5000`);
}
);Configuration
gibbon-mail must be setup to be used, you can find configuration in
./src/config.js.
Hack
Install dependencies first:
$ yarn installYou can start mailhog:
$ docker-compose up -d$ yarn run testAccess to mailhog1: http://127.0.0.1:8025/ Access to mailhog2: http://127.0.0.1:8026/
$ direnv allow$ yarn run watchAccess to Swagger docs: http://127.0.0.1:5000/docs/
If you want to try second smtp server, uncomment these lines
$ direnv allow