title: Sails.getDatastores is not a function
body: <p>I'm having an issue, when I want to perform a MongoDB database operation every time I boot SailsJs (v1.0.0-49), declaring db like this:</p>
  
  <pre><code>const db = sails.getDatastore().manager
  </code></pre>
  
  <p>But I get the following:</p>
  
  <blockquote>
    <p>TypeError: sails.getDatastore is not a function</p>
  </blockquote>
  
  <p><strong>UPDATE:</strong> I am not using sails (Waterline) Models.</p>
  
  <p>Now, I've tried using it in config/bootstrap.js, as a Hook and as a Service, with no success. I've also asked in a related issue in their repository without any response since last year.</p>
  
  <p>Here's the link of my original post:
  <a href="https://github.com/balderdashy/sails/issues/4156" rel="nofollow noreferrer">https://github.com/balderdashy/sails/issues/4156</a></p>