It's working fine now. The problem was inside the server function. I had to change the name of the array (payload -> data) and the request has to hand over a parameter called last_page which I just set to 1 (as long as it works )
You come at this forum with a "node-red" question, I am trying to help you to make this work the node-red way. "Well.. it is what it is" and ignore it and in the mean time you reinvent the wheel by using an additional express server. Node-red has no use here. Try rebooting your server and see if it still works....hint: it won't.
My hint: remove the whole nodejs+express idea and try to set it up as as shown above, I am willing to help.
should be something like http(s)://<node-red-ip>:<port>/fetchmessungen
to add the last_page you can add a change node and set msg.last_page to some value, but if you want to do it properly with actual progressive loading you should use LIMIT with an OFFSET in your query. last page would be total records/limit.
Make sure to add debug nodes everywhere to see what is actually happening when tabulator calls the url.
When tabulator calls the url, you will see something like "page=x", you can use a change node to set the query and feed it into the mysql node, if you read the sidebar documentation for the mysql node:
msg.topic must hold the query for the database, and the result is returned in msg.payload .
The port is the same as the node-red interface (default 1880)
When you add a debug node to the http-in node you can see what is being requested.
Sorry but I always tried to work around these http nodes and dont really know how to use them yet.
Understandable, but once you understand what they do, they are extremely useful, because you can create API's with them very easily (the same as you did with nodejs + express, but it is already build in).
If I "emulate" your flow (i dont have mysql/tabulator etc):
I open a browser tab to: http://10.0.0.6:1880/fetchmessungen?page=16&paginationSize=1000, I see this in my node-red flow/debug
Very nice, I think I'm getting in love with these http nodes.
The data is coming in from the database. The only problem we have now is that the array has to be named to data. Otherwhise tabulator isn't able to import the data.
EDIT: I tried it with a function node:
var data = msg.payload;
node.send(data);
node.done();
But the http-response node doesnt like that. I guess because its not the "original" message that comes from the http in node
Then you can use (another) change node, after the mysql node and use the "move" option to move msg.payload to msg.data (depending on what it tries to read, because it could be msg.data, or msg.payload.data)
(not sure if the mysql node strips off all properties from msg, else you could skip the first step and directly set it to msg.payload.last_page = msg.page)
you can chain the nodes, first do a query like select count(*) from yourtable, and use a change node to set to some total property and use that for calculations and from there create the new query
Now just for a hint, you can now also create your own webpage, by adding a normal template node (non-UI) with the html/javascript/css code -> response node and then opening the url in a new tab
I use this setup a lot to create custom API interfaces / pages.