I need an node script which can dynamically load modules from a modules folder. That means if a new module is added to the modules folder, and the node script is restarted, it will automatically import and use the module.
The node script needs to be able to pass a dictionary to the module. The module needs to be able to return a dictionary to the node script. (This will be a common interface for every module - receive a dictionary, return a dictionary).
Let me give an example so you clearly understand my meaning:
In /home/scripts is main.js. This simple script contains a dictionary.
A module called [login to view URL] is added to /home/scripts/modules.
When [login to view URL] is restarted:
- it automatically loads [login to view URL]
- it passes the dictionary to [login to view URL]
- [login to view URL] does something with this dictionary
- [login to view URL] returns the dictionary to [login to view URL]
There are two things to keep in mind here:
1. There might be many modules in /home/scripts/modules. [login to view URL] should process them one by one, rather than concurrently.
2. If a module has a problem (e.g. syntax error), it should not crash main.js.
Any questions, just ask. Thanks.
19 freelancers are bidding on average $127 for this job
hello. i am very interested in your post project. As you can see my profile, i am node js expert. so i am sure i can give you good result in time please call me Dmitrii. looking forward your reply. best regards
Hi Nice to meet you. I would like to have a conversation with you about your project. I saw your project description. I am confident to finish your assignment. I want to have good results. thanks.
Hey, It's a simple task for me, don't waste your time to find other candidates. I'm MEAN Stack expert, over 5 years of experience. Waiting for your response. Best, R. Keyan