Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/etiennemarais/mjml-to-html

A light MJML api service to convert mjml on the server to html output.
https://github.com/etiennemarais/mjml-to-html

curl mjml mjml-to-html nodejs service

Last synced: about 5 hours ago
JSON representation

A light MJML api service to convert mjml on the server to html output.

Awesome Lists containing this project

README

        

# mjml-to-html

A light MJML api service to convert mjml on the server to html output.

## Installation

* Install dependencies
* `yarn install`
* Run the server
* `yarn start`
* Configure a reverse proxy to 127.0.0.1:9001

## How to use the server?

```bash
curl -X POST "http://127.0.0.1:9001" --header "Content-Type: application/json" -d '{"mjml":"Hello World"}'
```

```json
{"html":"\n \n \n \n \n \n \n \n \n \n \n \n \n #outlook a { padding:0; }\n .ReadMsgBody { width:100%; }\n .ExternalClass { width:100%; }\n .ExternalClass * { line-height:100%; }\n body { margin:0;padding:0;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%; }\n table, td { border-collapse:collapse;mso-table-lspace:0pt;mso-table-rspace:0pt; }\n img { border:0;height:auto;line-height:100%; outline:none;text-decoration:none;-ms-interpolation-mode:bicubic; }\n p { display:block;margin:13px 0; }\n \n \n \n @media only screen and (max-width:480px) {\n @-ms-viewport { width:320px; }\n @viewport { width:320px; }\n }\n \n \n \n \n \n \n \n \n @import url(https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700);\n \n \n\n \n \n \n @media only screen and (min-width:480px) {\n .mj-column-per-100 { width:100% !important; max-width: 100%; }\n }\n \n \n \n \n \n \n \n \n \n \n \n \n

\n \n \n \n \n \n
\n \n \n \n \n \n \n \n
\n \n \n \n \n \n \n
\n Hello World\n
\n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n
\n \n \n \n \n \n
\n \n \n \n ","errors":[]}
```