Skip to content

Node based service for rendering MathML and TeX formulas into image. Based on MathJax.

License

Notifications You must be signed in to change notification settings

jagermesh/math-to-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Math To Image Service

Setup

  1. Add NPM package
npm init
npm install --save math-to-image
  1. Create math2image.js with following code as an example
const MathToImage = require('math-to-image');

let mathToImage = new MathToImage();
mathToImage.start();
  1. Run the service
node math2image.js

The best way to make sure service is always up and running is to use pm2.

  1. Create ecosystem.config.yml using following code as an example:
module.exports = {
  apps : [
    { name: 'Math2Image',
      script: 'math2image.js',
      instances: 1,
      autorestart: true,
      watch: true,
      watch_delay: 1000,
      ignore_watch : ["node_modules", ".git"],
      max_memory_restart: '1G',
    }
  ]
};
  1. Run service through pm2
pm2 start
  1. Check it's running using
pm2 ls
  1. Check logs using
pm2 logs

About

Node based service for rendering MathML and TeX formulas into image. Based on MathJax.

Resources

License

Stars

Watchers

Forks

Packages

No packages published