Skip to content

Instantly share code, notes, and snippets.

@faustoct1
Created July 20, 2022 03:33
Show Gist options
  • Save faustoct1/207fd81a59711469a324d84286b531bc to your computer and use it in GitHub Desktop.
Save faustoct1/207fd81a59711469a324d84286b531bc to your computer and use it in GitHub Desktop.
test-require-import-modules
const {funcao1,funcao2,funcao3} = require('./modules')
exports.test = test = async () => {
await funcao1()
await funcao2()
await funcao3()
}
(async ()=>{ test() })() //chama test
exports.funcao1 = async () => {
console.log('test')
}
exports.funcao2 = async () => {
console.log('test 2')
}
exports.funcao3 = async () => {
console.log('test 3')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment