You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, at start I would like to thank you for developing this template.
I'm trying to make my first app that will work on a computer without internet access, however to draw graph i use node-red-node-ui-vega which unfortunately fetches data from CDN.
Fortunately in Node-RED if a module has a directory called resources at the top level, the runtime will make anything in that directory available to the editor under the url /resources// https://nodered.org/docs/creating-nodes/resources.
So i save source from CDN as .js files and place them in resources folder. Everything works great when i run node-red from terminal, I have acces to files like http://localhost:1880/resources/node-red-node-ui-vega/vega-cdn.js ect.
But when I build app or try it by yarn start i get Cannot GET /resources/node-red-node-ui-vega/vega-cdn.js even though i have access to editor and UI on app port(18880 set in main.js).
Has anyone encountered a similar problem or can give me some guidance.?Thanks in advance.
The text was updated successfully, but these errors were encountered:
Hello,
thanks for the idea goodartmr.
I put the files downloaded from the CDN in a folder called "external" in the main directory and in main.js I make the following change: red_app.use('/external', express.static(path.join(__dirname, 'external')))
In addition, to package the application, you need to add a fragment in the package.json file
Hello, at start I would like to thank you for developing this template.
I'm trying to make my first app that will work on a computer without internet access, however to draw graph i use node-red-node-ui-vega which unfortunately fetches data from CDN.
Fortunately in Node-RED if a module has a directory called resources at the top level, the runtime will make anything in that directory available to the editor under the url /resources// https://nodered.org/docs/creating-nodes/resources.
So i save source from CDN as .js files and place them in resources folder. Everything works great when i run node-red from terminal, I have acces to files like http://localhost:1880/resources/node-red-node-ui-vega/vega-cdn.js ect.
But when I build app or try it by yarn start i get Cannot GET /resources/node-red-node-ui-vega/vega-cdn.js even though i have access to editor and UI on app port(18880 set in main.js).
Has anyone encountered a similar problem or can give me some guidance.?Thanks in advance.
The text was updated successfully, but these errors were encountered: