Skip to content

Instantly share code, notes, and snippets.

const fs = require('fs')
const writeFileController = (pathController, moduleName) => {
fs.writeFile(`${pathController}/${moduleName}.js`, "", function(err) {
if(err) {
return console.log(err);
}
console.log(`Create ${moduleName} controller file success!`);
})
}