{"id":20047905,"url":"https://github.com/chronotruck/mjml2html","last_synced_at":"2025-05-05T10:31:26.777Z","repository":{"id":38229450,"uuid":"143730153","full_name":"chronotruck/mjml2html","owner":"chronotruck","description":"Expose a simple API to convert MJML to HTML on the fly.","archived":false,"fork":false,"pushed_at":"2024-02-14T14:46:33.000Z","size":1631,"stargazers_count":12,"open_issues_count":16,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T21:23:43.604Z","etag":null,"topics":["api","docker","email","express","mjml","nodejs"],"latest_commit_sha":null,"homepage":"https://github.com/orgs/chronotruck/packages/container/package/mjml2html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chronotruck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-06T13:09:06.000Z","updated_at":"2025-03-16T21:14:14.000Z","dependencies_parsed_at":"2023-02-05T01:30:36.642Z","dependency_job_id":null,"html_url":"https://github.com/chronotruck/mjml2html","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronotruck%2Fmjml2html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronotruck%2Fmjml2html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronotruck%2Fmjml2html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronotruck%2Fmjml2html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chronotruck","download_url":"https://codeload.github.com/chronotruck/mjml2html/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252480463,"owners_count":21754777,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","docker","email","express","mjml","nodejs"],"created_at":"2024-11-13T11:39:26.088Z","updated_at":"2025-05-05T10:31:26.406Z","avatar_url":"https://github.com/chronotruck.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MJML2HTML\n\n![CircleCI](https://img.shields.io/circleci/project/github/chronotruck/mjml2html/master.svg)\n![Dependencies](https://img.shields.io/david/chronotruck/mjml2html.svg)\n![Dev Dependencies](https://img.shields.io/david/dev/chronotruck/mjml2html.svg)\n![Docker Pulls](https://img.shields.io/docker/pulls/chronotruck/mjml2html.svg)\n[![License](https://img.shields.io/github/license/chronotruck/mjml2html.svg)](https://github.com/chronotruck/mjml2html/blob/master/LICENSE)\n\n\u003e Simple API to convert MJML content to HTML on the fly.\n\n## Requirements\n\n- Git\n- Docker\n- Docker-compose\n\n## Getting started\n\nTo set-up the project, run the following command:\n\n```bash\ndocker-compose up\n```\n\nOnce the Docker is running, you can use your API endpoint under `localhost:3001`.\n\n## Usage\n\nThis project exposes a `POST` endpoint under `/`. To make it work, you must send a `text/plain` body with your MJML content.\nWhen received, the server converts your MJML into an HTML string and returns the content as `text/html`.\n\n## Example\n\n```bash\ncurl --header \"Content-Type: text/plain\" \\\n  --request POST \\\n  --data '\u003cmjml\u003e\u003cmj-body\u003e\u003cmj-text\u003eHello!\u003c/mj-text\u003e\u003c/mj-body\u003e\u003c/mjml\u003e' \\\n  http://localhost:3001/\n```\n\nMay return:\n```html\n\u003c!doctype html\u003e\n    \u003chtml xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\"\u003e\n      \u003c!-- Head (croped for demo)... --\u003e\n      \u003cbody\u003e\n      \u003cdiv\n         style=\"\"\n      \u003e\n      \u003cdiv\n         style=\"font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:left;color:#000000;\"\n      \u003e\n        Hello!\n      \u003c/div\u003e\n      \u003c/div\u003e\n      \u003c/body\u003e\n    \u003c/html\u003e\n```\n\n## API\n\nTo use the API params, you can pass them as query parameters\n`localhost:3001/?comments=false\u0026minfiy=true`.\n\n| Param      | Type       | Default    | Possible values |\n|------------|------------|------------|------------\n| comments    | Boolean | false |\n| minify    | Boolean | false |\n| beautify    | Boolean | false |\n| validation    | String | strict | skip, soft, strict\n\n## License\n\nThis project is licensed under [MIT License](http://en.wikipedia.org/wiki/MIT_License)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchronotruck%2Fmjml2html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchronotruck%2Fmjml2html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchronotruck%2Fmjml2html/lists"}