
Urgent: Need a Node.js developer
1579
$50
- Posted:
- Proposals: 0
- Remote
- #3104980
- Archived
Description
Experience Level: Entry
Please use async/await for Javascript
I need JS code which can do the following: the Main.js is the root file and in the same level, there will be folder1, folder2, folder3.
1. Main.js contains two objects: data, result
2. Main.js opens a folder called folder_name1, finds any .js files in the folder, and executes them one by one.
3. Main.js then opens a folder called folder_name2, finds any .js files in the folder, and executes them one by one.
4. Main.js then opens a folder called folder_name3, finds any .js files in the folder, and executes them one by one.
5. Finally, main.js executes a function.
Important notes:
A) The ordering of execution must be 2 -> 3 -> 4 -> 5.
This means when all of (2) is done, it will then execute (3);
when all of (3) is done, it will then execute (4); finally when (4) it done it will execute (5).
B) Each of the .js files in each of the folders are simple functions like this:
function my_function (data, result) {
// do something (it'll take sometime, you can use setTimeout() here, so that delay the time, for example.
return result;
}
module.exports = my_function;
As you can see, the function is accepting the two objects from main.js, and returning the result object.
So your code will open each .js file and execute the single exported function in it.
Your code should be as simple as possible.
If you make a good deliverable, there'll be a lot of big projects.
I need JS code which can do the following: the Main.js is the root file and in the same level, there will be folder1, folder2, folder3.
1. Main.js contains two objects: data, result
2. Main.js opens a folder called folder_name1, finds any .js files in the folder, and executes them one by one.
3. Main.js then opens a folder called folder_name2, finds any .js files in the folder, and executes them one by one.
4. Main.js then opens a folder called folder_name3, finds any .js files in the folder, and executes them one by one.
5. Finally, main.js executes a function.
Important notes:
A) The ordering of execution must be 2 -> 3 -> 4 -> 5.
This means when all of (2) is done, it will then execute (3);
when all of (3) is done, it will then execute (4); finally when (4) it done it will execute (5).
B) Each of the .js files in each of the folders are simple functions like this:
function my_function (data, result) {
// do something (it'll take sometime, you can use setTimeout() here, so that delay the time, for example.
return result;
}
module.exports = my_function;
As you can see, the function is accepting the two objects from main.js, and returning the result object.
So your code will open each .js file and execute the single exported function in it.
Your code should be as simple as possible.
If you make a good deliverable, there'll be a lot of big projects.

Dmitry S.
100% (4)Projects Completed
2
Freelancers worked with
1
Projects awarded
33%
Last project
13 Jan 2021
Russian Federation
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies