HUB
Sign inSign up

programster/mjml-server

By programster

•Updated about 2 months ago

Programster's own custom MJML server from https://github.com/programster/MJML-API

Image
0

859

programster/mjml-server repository overview

This is my own version of the MJML API server (GitHub⁠), to resolve escaping frustrations I was having with other APIs. With this API, one POSTs an uploaded file to the /v1/render endpoint, and the API will return the HTML version of the file. This way, we do not have to worry about any escaping or JSON encoding issues with the submission of the MJML content.

⁠Example Usage

You can run the API by running the following command:

docker run -d \
  --restart=always \
  -p80:80 \
  programster/mjml-server

Alternatively, those who have installed Docker Compose can an use the example docker-compose.yml file below:

version: "3.9"

services:
  app:
    container_name: mjml-server
    image: programster/mjml-server
    restart: always
    ports:
      - "80:80"

... and then run:

docker-compose up -d

To convert a file, you can use curl like so (assuming you deployed locally)

curl -F my-file.mjml=@/path/to/file.mjml http://localhost/v1/render
Tag summary
Recent tags
Content type
Image
Digest
sha256:d4a655c0f…
Size
188.5 MB
Last updated
about 2 months ago
docker pull programster/mjml-server:latest