@Amit5001 so, you will need to write a module.
mm runs inside a browser, electron, chrome, Firefox, … it displays one web page
each module gets data from somewhere and builds a small blob of html, or dom content, and gives that to mm, which places it in the browser DOM in the position you configured
the spec is here
you can use my SampleModule as a starting place, it’s got all the parts
something to do before that, is to figure out how u want it displayed and build the html to do that, it’s just text. you can test that output in any browser.
a module is split into 2 parts.
the part that runs in the browser and does all the display work
I call it modulename.js cause it’s filename matches the module name. it’s the part that interfaces to mm
but a browser cannot read files (incl database) or touch hardware directly. for security. browser cannot import or require to load libraries.
so if u need to do that, you use the helper, called node_helper.js. there is a small communication mechanism between the two parts.
modulename.js sends a message, send socket notification
and the helper receives them, receiveSocketNotification
when done the exact same calls are used in the other direction. helper sends module name.js receives. this is a private channel between this module and it’s helper.