enveloper
enveloper copied to clipboard
Enveloper as generic service via runtime templates
It's been suggested that one way that enveloper would be useful would be as a generic service in a microservices setup. Currently the templates are either volume mounted or built into the service, coupling it to the application it's running for, rather than being entirely generic.
The idea for the change or addition would be that as well as being able to do this:
POST /outbox
{
"template": "some-template",
"parameters": "..."
}
You could also pass in HTML/MJML/etc directly, e.g.
POST /outbox
{
"template": {
"subject": "{{ subject }}",
"to": "...",
...
"content": {
"html": "<mjml>...</mjml>"
}
},
"parameters": "..."
}
I've had similar thoughts before but I want to clarify if and why we want this before building. If it's something you want, add your comments below.
So:
- is this a good idea?
- if anyone can think of an app you'd use it in, can you explain your use-case?
- is this the right api, could it be simpler?
- can we still support includes/partials? 1