Skip to content

Latest commit

 

History

History
76 lines (50 loc) · 3.13 KB

README.md

File metadata and controls

76 lines (50 loc) · 3.13 KB

NGX Email Builder Converter

This application is part of the NGX Email Builder project. The NGX Email Builder is a tool that allows users to create emails using a drag-and-drop interface.

The main scope of project is to convert IPEmail to MJML and renders them to HTML, but it has other things like:

How it works

The application is built using Express and MJML. It exposes some endpoints that allow you to convert IPEmail to MJML and render it to HTML.

There are two-way to convert IPEmail to HTML:

Run locally

First make sure you have Node.js installed globally.

This project uses pnpm as the package manager. To install pnpm, you can run the following command:

npm install -g pnpm

To run the application locally, follow these steps:

pnpm install
// for production
pnpm start
// for development
pnpm dev

Then you can access the application by visiting http://localhost:3000/ping in your web browser.

Run Docker container

To build the image, you can run the following command from the directory where the Dockerfile is located:

docker build -t angular-mjml-output .

Replace angular-mjml-output with the desired name for your image.

To run the container, you can use the following command:

docker run -p 3000:3000 angular-mjml-output

This will start the container and bind port 3000 on the host machine to port 3000 on the container. This allows you to access the application by visiting http://localhost:3000/ping in your web browser.

Run Docker container with Docker Compose

This docker-compose.yml file does the following:

  • Defines a single service called angular-mjml-output.
  • Builds the angular-mjml-output service using the Dockerfile in the current directory (.).
  • Maps port 3000 on the host machine to port 3000 on the container.
  • Sets the restart policy for the app service to always, which means that the container will be automatically restarted if it stops or crashes.

To build and run the containers, you can use the following command:

docker-compose up

This will build the image and start the container, and you should be able to access the Express application by visiting http://localhost:3000/ping in your web browser.