I'm trying to figure out how to import data from nodejs to html webpage. I explain my problem clearly:
I have 3 files:
- index.html
- processData.js
- plot.js
In processData.js there is a Nodejs function that retrieve from a mongoDB database some data and return them into an array. The problem is that I need to import module processData in plot.js to use it ( perhaps using chart.js). It's all day that I try but there's the problem that in pure javascript I cannot import Nodejs modules and in NodeJS I cannot use window
Anyone can help me?