httpserver modeĭon’t forget to install requests to use this mode. You also can build your own tcpserver with other versions of MJML by usingĭocker/mjml-tcpserver file and editing arguments. MJML_ARGS: "-mjml.minify=true -mjml.validationLevel=strict" Stdout_logfile=/home/user/project/var/log/supervisor/mjml.log port=28101 -host=127.0.0.1 -touchstop=/tmp/mjmltcpserver.stop -mjml.minify=true -mjml.validationLevel=strict home/user/.virtualenv/default/lib/python2.7/site-packages/mjml/node/tcpserver.js You can run servers by commands: # NODE_PATH=/home/user/node_modules node /home/user/.virtualenv/default/lib/python2.7/site-packages/mjml/node/tcpserver.js -port=28101 -host=127.0.0.1 -touchstop=/tmp/mjmltcpserver.stopĢ8101 - port, 127.0.0.1 - host, /tmp/mjmltcpserver.stop - file that will stop server after touch.įor daemonize server process you can use, for example, supervisor: /etc/supervisor/conf.d/nfĮnvironment=NODE_PATH=/home/user/node_modules You can set several servers and a random one will be used: MJML_TCPSERVERS = [ This mode is faster than cmd but it needs run a separated server process which will render templates. Once you have a working installation, you can skip the sanity check on startup to speed things up: MJML_CHECK_CMD_ON_STARTUP = False tcpserver mode You can change MJML_EXEC_CMD and set path to executable mjml file, for example: MJML_EXEC_CMD = '/home/user/node_modules/.bin/mjml'Īlso you can pass addition cmd arguments, for example: MJML_EXEC_CMD = This mode is very simple, slow and used by default. There are three backend modes for compiling: cmd, tcpserver and httpserver.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |