Read the statement by Michael Teeuw here.
Running the same module twice with different URL, but same content is being displayed (MMM-HTMLSnippet)
-
@kasperb sadly the module is not designed to be used in multiples
the problem is the url to get the html (which isn’t needed anyhow)
the node helper sets up a ‘server’ to return the html,. and the web side calls to get it
‘/MMM-HTMLSnippet’but MM cannot have two servers with the same name, so first one wins…
if you turn the two entries around, the resutls will be from the top one…
-
@kasperb you could hack one module to get what I want.
edit the second one, where u changed the name. change the
/MMM-HTMLSnippet
to
/MMM-HTMLSnippet2
in both .js files
-
@sdetweil Thanks for your response. When you say both *.js files, which ones exactly do you mean? There is only one *.js file in the folder with ‘MMM-HTMLSnippet’ in it.
-
@kasperb node_helper.js
this.expressApp.get("/MMM-HTMLSnippet", (req, res) => {
and
MMM-HTMLSnippet.jswrapper.src = '/MMM-HTMLSnippet'
-
@sdetweil You’re right; I missed that one.
Thank you - that did the trick and both versions of the module now work as expected.