math-to-image

1.0.19 • Public • Published

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

Run using pm2 http://pm2.keymetrics.io.

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

Package Sidebar

Install

npm i math-to-image

Weekly Downloads

6

Version

1.0.19

License

MIT

Unpacked Size

433 kB

Total Files

8

Last publish

Collaborators

  • jagermesh