iisnode encountered an error when processing the request.

HRESULT: 0x2
HTTP status: 500
HTTP subStatus: 1002
HTTP reason: Internal Server Error

You are receiving this HTTP 200 response because system.webServer/iisnode/@devErrorsEnabled configuration setting is 'true'.

In addition to the log of stdout and stderr of the node.exe process, consider using debugging and ETW traces to further diagnose the problem.

The last 64k of the output generated by the node.exe process to stderr is shown below:

(node:1064) [MONGODB DRIVER] Warning: useNewUrlParser is a deprecated option: useNewUrlParser has no effect since Node.js Driver version 4.0.0 and will be removed in the next major version
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1064) [MONGODB DRIVER] Warning: useUnifiedTopology is a deprecated option: useUnifiedTopology has no effect since Node.js Driver version 4.0.0 and will be removed in the next major version
(node:1064) [MONGODB DRIVER] Warning: useNewUrlParser is a deprecated option: useNewUrlParser has no effect since Node.js Driver version 4.0.0 and will be removed in the next major version
(node:1064) [MONGODB DRIVER] Warning: useUnifiedTopology is a deprecated option: useUnifiedTopology has no effect since Node.js Driver version 4.0.0 and will be removed in the next major version
(node:1064) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Could not connect to MongoDB MongooseServerSelectionError: connect ECONNREFUSED ::1:27017, connect ECONNREFUSED 127.0.0.1:27017
    at _handleConnectionErrors (C:\Websites\codeachi-web-MERN\code\auth\node_modules\mongoose\lib\connection.js:875:11)
    at NativeConnection.openUri (C:\Websites\codeachi-web-MERN\code\auth\node_modules\mongoose\lib\connection.js:826:11) {
  reason: TopologyDescription {
    type: 'Unknown',
    servers: Map(1) { 'localhost:27017' => [ServerDescription] },
    stale: false,
    compatible: true,
    heartbeatFrequencyMS: 10000,
    localThresholdMS: 15,
    setName: null,
    maxElectionId: null,
    maxSetVersion: null,
    commonWireVersion: 0,
    logicalSessionTimeoutMinutes: null
  },
  code: undefined
}
Error connecting to MongoDB: MongoServerSelectionError: connect ECONNREFUSED ::1:27017, connect ECONNREFUSED 127.0.0.1:27017
    at AbortSignal.<anonymous> (C:\Websites\codeachi-web-MERN\code\auth\node_modules\mongodb\lib\sdam\topology.js:292:34)
    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:843:20)
    at AbortSignal.dispatchEvent (node:internal/event_target:776:26)
    at runAbort (node:internal/abort_controller:547:10)
    at abortSignal (node:internal/abort_controller:518:3)
    at TimeoutController.abort (node:internal/abort_controller:566:5)
    at Timeout.<anonymous> (C:\Websites\codeachi-web-MERN\code\auth\node_modules\mongodb\lib\utils.js:1008:92)
    at listOnTimeout (node:internal/timers:605:17)
    at process.processTimers (node:internal/timers:541:7) {
  reason: TopologyDescription {
    type: 'Unknown',
    servers: Map(1) { 'localhost:27017' => [ServerDescription] },
    stale: false,
    compatible: true,
    heartbeatFrequencyMS: 10000,
    localThresholdMS: 15,
    setName: null,
    maxElectionId: null,
    maxSetVersion: null,
    commonWireVersion: 0,
    logicalSessionTimeoutMinutes: null
  },
  code: undefined,
  Symbol(errorLabels): Set(0) {},
  [cause]: MongoNetworkError: connect ECONNREFUSED ::1:27017, connect ECONNREFUSED 127.0.0.1:27017
      at connectionFailureError (C:\Websites\codeachi-web-MERN\code\auth\node_modules\mongodb\lib\cmap\connect.js:357:20)
      at Socket.<anonymous> (C:\Websites\codeachi-web-MERN\code\auth\node_modules\mongodb\lib\cmap\connect.js:268:44)
      at Object.onceWrapper (node:events:631:26)
      at Socket.emit (node:events:509:28)
      at emitErrorNT (node:internal/streams/destroy:170:8)
      at emitErrorCloseNT (node:internal/streams/destroy:129:3)
      at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
    Symbol(errorLabels): Set(1) { 'ResetPool' },
    [cause]: AggregateError [ECONNREFUSED]: 
        at internalConnectMultiple (node:net:1194:18)
        at afterConnectMultiple (node:net:1784:7) {
      code: 'ECONNREFUSED',
      [errors]: [Array]
    }
  }
}