Aswin - When I create a new plugin, what is the...
When I create a new plugin, what is the best file location to do so? I am a bit confused where to place my nodejs plugin, can I use any directory or is it better to use a subdirectory of .signalk? (I use windows 11 if that matters)
3 Replies
Not sure how it works in windows, but i prefer npm linking https://github.com/SignalK/signalk-server/wiki/FAQ:-Frequently-Asked-Questions#how-do-i-develop-a-plugin-or-webapp-so-that-i-can-run-it-in-the-server
GitHub
FAQ: Frequently Asked Questions
An implementation of a Signal K central server for boats. - SignalK/signalk-server
Thanks for the answer, but it is way over my head and I do not understand it. I am very new to npm and I have only limited experience with git. I will try to explain what I did. I have a signalK server running. To develop my plugin I made a new directory (say c:\plugin). This directory is not within the signalK structure. To run my plugin from the server I did a "link" form the plugin directory and another "link plugin" from the .signal directory. The plugin works, that is not the problem. But when issuing the first link, from the plugin directory, a directory node_modules was created with hundreds of files in it. Now, this node_modules is also found in the .signalk directory. Having this direcory twice now, it made me wonder, should I have to developed my plugin in the .signalk directory to prevent the double installl of node_modules? The documentation was not specific about it.
I think you have it correctly