title: mongodb (node:37068) UnhandledPromiseRejectionWarning: error with nodejs app on windows
body: <p>I have this error:</p>
  <pre><code>(node:37068) UnhandledPromiseRejectionWarning: MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017
      at NativeConnection.Connection.openUri (D:\Downloads\node-url-shortner\node_modules\mongoose\lib\connection.js:846:32)
      at D:\Downloads\node-url-shortner\node_modules\mongoose\lib\index.js:350:10
      at D:\Downloads\node-url-shortner\node_modules\mongoose\lib\helpers\promiseOrCallback.js:31:5
      at new Promise (&lt;anonymous&gt;)
      at promiseOrCallback (D:\Downloads\node-url-shortner\node_modules\mongoose\lib\helpers\promiseOrCallback.js:30:10)
      at Mongoose._promiseOrCallback (D:\Downloads\node-url-shortner\node_modules\mongoose\lib\index.js:1154:10)
      at Mongoose.connect (D:\Downloads\node-url-shortner\node_modules\mongoose\lib\index.js:349:20)
      at Object.&lt;anonymous&gt; (D:\Downloads\node-url-shortner\server.js:5:10)
      at Module._compile (internal/modules/cjs/loader.js:999:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
      at Module.load (internal/modules/cjs/loader.js:863:32)
      at Function.Module._load (internal/modules/cjs/loader.js:708:14)
      at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
      at internal/main/run_main_module.js:17:47 (node:37068) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async  function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:37068) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (node:37068) UnhandledPromiseRejectionWarning: MongooseError: Operation `shorturls.insertOne()` buffering timed out after 10000ms
      at Timeout.&lt;anonymous&gt; (D:\Downloads\node-url-shortner\node_modules\mongoose\lib\drivers\node-mongodb-native\collection.js:185:20)
      at listOnTimeout (internal/timers.js:554:17)
      at processTimers (internal/timers.js:497:7) (node:37068) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async  function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
  </code></pre>
  <p>Please help me out, my node.js app failed</p>