Open JVTEAM opened 3 years ago
Yes that is the way the settings.js file is, its mostly comments to show things you might want to do. By default functionGlobalContext should be defined but empty, although there may be some system and node-red version differences.
You need to add the line to:
functionGlobalContext: { insidePolygon:require('point-in-polygon') // os:require('os'), // jfive:require("johnny-five"), // j5board:require("johnny-five").Board({repl:false}) },
Use your editor search function to find functionGlobalContext and add the line before the //os:require comment or after the //j5board line but inside the {} stanza.
cd .. && nano .node-red/settings.js and add: insidePolygon:require('point-in-polygon') to functionGlobalContext: {} and restart node-red
There's 255 lines of mostly commented out stuff in here. Where and what is this part added to?