title: Koa2 + Mongoose + async/await
body: <p>Trying a basic thing in Koa2, fetching results from MongoDB and sending it in response. Following is my code with koa-router.</p>
  
  <p>If I try to send the record in ctx.body, the result is always "Not Found" response. Help!!</p>
  
  <pre><code>import Router from 'koa-router';
  import Users from '../models/users';
  
  const router = new Router();
  
  router.get('/users', async (ctx, next) =&gt; {
  
    const user = await Users.find();
    ctx.body = 'the result'; // how do I populate the user record here
    //ctx.body = JSON.stringify(user) always returns in a "Not Found" response
  
  });
  export default router;
  </code></pre>
  
  <p>For reference my model users.js</p>
  
  <pre><code>import mongoose from 'mongoose';
  
  const User = new mongoose.Schema({
    name: {
      type: String
    }
  });
  
  export default mongoose.model('users', User)
  </code></pre>