Skip to content

Latest commit

 

History

History
39 lines (32 loc) · 774 Bytes

README.md

File metadata and controls

39 lines (32 loc) · 774 Bytes

ElixirWithMjml

To start your Phoenix server:

  • Install dependencies with mix deps.get
  • Install Node.js dependencies with cd assets && npm install
  • Start Phoenix endpoint with mix phx.server

Now you can visit localhost:4000 from your browser.

alt tag

<mjml>
  <mj-body>
    <mj-section>
      <mj-column>
        <mj-text font-size="20px" color="#F45E43" font-family="helvetica">Elixir with mjml</mj-text>
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>

Post : localhost:4000/api/mjml

{
 "minify": false,
 "mjml": "<mjml>...</mjml>"
}

Response :

{
 "html": "<!DOCTYPE HTML><html>...</html>",
 "errors": []
}