function doSomthing(){ console.log('Hello Word') } // do is the name which you want to use in other files module.exports = { do:doSomthing }