cant run files in nodejs other than default file

how to run my nodejs file other than the default file?

You are viewing a single comment. View All
vedprad1 (726)

Unfortunately, on you cannot run any file except the original file. If you want to run another file on node.js, you can do this:


const other = require('./other.js');


module.exports = () => {
    //your code here

If this is answer is correct, please check the checkmark on the left side of this message. Thanks and Good Luck!