Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 1 month ago
JSON representation
A light MJML api service to convert mjml on the server to html output.
- Host: GitHub
- URL: https://github.com/etiennemarais/mjml-to-html
- Owner: etiennemarais
- License: mit
- Created: 2018-07-26T06:31:42.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T10:51:05.000Z (about 2 years ago)
- Last Synced: 2023-12-17T03:41:57.185Z (about 1 year ago)
- Topics: curl, mjml, mjml-to-html, nodejs, service
- Language: JavaScript
- Size: 255 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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 ","errors":[]}\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
```