<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[expressApp.get - Error Cannot GET ...]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I intercept a webservice call via node_helper.js. Now I wanted to handle two more webservice calls. Unfortunately this doesn’t work.</p>
<p dir="auto">my code:</p>
<pre><code>const NodeHelper = require("node_helper")
var async = require('async');
var exec = require('child_process').exec;
var express = require('express');
var app = express();

...

module.exports = NodeHelper.create({
	
	start: function() {
		//console.error('Starting node helper: ' + this.name);
		var self = this;
		
		// Updateinterval ändern über Aufruf http://127.0.0.1:8080/MMM-CaravanPiPosition/changeUpdateInterval
		this.expressApp.get('/' + this.name + '/changeUpdateInterval', function (req, res) {
			res.send('Change UpdateInterval from '+ myUpdateInterval);
			self.changeUpdateInterval();
		});
		
		// Kalibrierung anzeigen über Aufruf http://127.0.0.1:8080/MMM-CaravanPiPosition/setCalibration
		this.expressApp.get('/' + this.name + '/setCalibration', function (req, res) {
			res.send('set Calibration');
			valueListNHCaravanPiPosition[0]["cal"] = 1;
		});
		
		// Kalibrierung löschen über Aufruf http://127.0.0.1:8080/MMM-CaravanPiPosition/unsetCalibration
		this.expressApp.get('/' + this.name + '/unsetCalibration', function (req, res) {
			res.send('unset Calibration');
			valueListNHCaravanPiPosition[0]["cal"] = 0;
		});
	},
...
</code></pre>
<p dir="auto">The call of <a href="http://127.0.0.1:8080/MMM-CaravanPiPosition/changeUpdateInterval" target="_blank" rel="noopener noreferrer nofollow ugc">http://127.0.0.1:8080/MMM-CaravanPiPosition/changeUpdateInterval</a> works as desired.</p>
<p dir="auto">The calls of <a href="http://127.0.0.1:8080/MMM-CaravanPiPosition/setCalibration" target="_blank" rel="noopener noreferrer nofollow ugc">http://127.0.0.1:8080/MMM-CaravanPiPosition/setCalibration</a> and … unsetCalibration does not work.</p>
<p dir="auto">Instead the error message <strong>Cannot GET /MMM-CaravanPiPosition/setCalibration</strong> is displayed.</p>
<p dir="auto">what am i doing wrong? can’t several different webservice calls be processed?</p>
<p dir="auto">Thanks for every help</p>
<p dir="auto">Sepp</p>
]]></description><link>https://forum.magicmirror.builders/topic/11605/expressapp-get-error-cannot-get</link><generator>RSS for Node</generator><lastBuildDate>Sat, 13 Jun 2026 00:19:47 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/11605.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 16 Nov 2019 12:08:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to expressApp.get - Error Cannot GET ... on Sat, 16 Nov 2019 14:20:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/spitzlbergerj" aria-label="Profile: spitzlbergerj">@<bdi>spitzlbergerj</bdi></a> cool!!</p>
]]></description><link>https://forum.magicmirror.builders/post/64546</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/64546</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sat, 16 Nov 2019 14:20:33 GMT</pubDate></item><item><title><![CDATA[Reply to expressApp.get - Error Cannot GET ... on Sat, 16 Nov 2019 14:16:12 GMT]]></title><description><![CDATA[<p dir="auto">Hi Sam,<br />
yes, I had always asked myself that, but I am still a  Javascript Newby. I got the code from a forum post. After it worked with the first pattern, I thought, that’s because of my low JavaScript knowledge.</p>
<p dir="auto">I have now changed it with your help. And now it works.</p>
<p dir="auto">Thank you very much!<br />
Sepp</p>
]]></description><link>https://forum.magicmirror.builders/post/64544</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/64544</guid><dc:creator><![CDATA[spitzlbergerj]]></dc:creator><pubDate>Sat, 16 Nov 2019 14:16:12 GMT</pubDate></item><item><title><![CDATA[Reply to expressApp.get - Error Cannot GET ... on Sat, 16 Nov 2019 12:27:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/spitzlbergerj" aria-label="Profile: spitzlbergerj">@<bdi>spitzlbergerj</bdi></a> said in <a href="/post/64538">expressApp.get - Error Cannot GET ...</a>:</p>
<blockquote>
<p dir="auto">this.expressApp.</p>
</blockquote>
<p dir="auto">where is expressApp set?</p>
<p dir="auto">typically it is</p>
<pre><code>const app = express()
  // setup the pattern you listen for
  app.get(url_pattern, (req,res) =&gt; {})
</code></pre>
]]></description><link>https://forum.magicmirror.builders/post/64539</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/64539</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Sat, 16 Nov 2019 12:27:25 GMT</pubDate></item></channel></rss>