title: Nodejs - how group and export multiple functions in a separate file?
body: <p>How can I group and export multiple functions in nodejs?</p>
  
  <p>I am trying to group all my util functions in utils.js:</p>
  
  <pre><code>async function example1 () {
      return 'example 1'
  }
  
  async function example2 () {
      return 'example 2'
  }
  
  module.exports = { example1, example2 }
  </code></pre>
  
  <p>And then be imported in home.js:</p>
  
  <pre><code>  import { example1, example2 } from '../utils'
  
    router.get('/', async(ctx, next) =&gt; {
      console.log(example1()) // Promise { 'example 1' }
  
    })
  </code></pre>
  
  <p>I thought I would get <code>'example 1'</code> for the test case above?</p>
  
  <p>Any ideas?</p>