Get app instance , Create dynamic endpoints and response from a har file , can we execute express.js code

0
Hi every one, In my company they are already created a node.js application to view some 3d contents. there they will upload a file and extract it into a location and showing the contents. Extracted folder will also having a har file which contains url and responses. Here from one expressjs file they are parsing that har file and forming endpoint url and its responses. that end points are automatically hit by app.use method as it will be called for every request.  The same logic we want to do in our mendix application. we are able to extract the contents and access the folders and files from that extracted folder. but i don’t know how implement that express js logic, i.e parsing har file and make middleware code execution. we want to parse that har file then we need to register endpoints and its respective responses with our app instance. for that i want to execute expressjs/ nodejs code inside our mendix application ( from javascript action or java ). I have tried to include node modules into javascript action code. but its showing module not found. Even if we install that module then its popup error for another module. like this way I cant able to add node modules into our javascript action.
asked
1 answers
0

How have you added the node modules ?

They need to be in the same folder as the JS action and the JS action needs to refer to the module with a path. You might also need to add a dependencies JSON file.How have you added the node modules ? They need to be in the same folder as the JS action and the JS action needs to refer to the module with a path. You might also need to add a dependencies JSON file.

answered