RESOLVI ERRO ESTAVA EM mongoose.connect("mongodb+srv://admin:asd123456@cluster0.atju2dv.mongodb.net/DB_Legislacao?retryWrites=true&w=majority&appName=Cluster0");
moogoose ao invés de mongoose >>> ATENÇÃO!!
PS C:\Users\abarauna\NODEJS\Legis> npm run dev
legis@1.0.0 dev nodemon server.js
[nodemon] 3.1.2
[nodemon] to restart at any time, enter rs
[nodemon] watching path(s): .
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting node server.js
file:///C:/Users/abarauna/NODEJS/Legis/src/config/dbConnect.js:8
moogoose.connect("mongodb+srv://admin:asd123456@cluster0.atju2dv.mongodb.net/DB_Legislacao?retryWrites=true&w=majority&appName=Cluster0");
^
ReferenceError: moogoose is not defined at conectaNaDatabase (file:///C:/Users/abarauna/NODEJS/Legis/src/config/dbConnect.js:8:5) at file:///C:/Users/abarauna/NODEJS/Legis/src/app.js:11:23 at ModuleJob.run (node:internal/modules/esm/module_job:192:25) at async DefaultModuleLoader.import (node:internal/modules/esm/loader:246:24) at async loadESM (node:internal/process/esm_loader:40:7) at async handleMainPromise (node:internal/modules/run_main:66:12)
Node.js v20.3.1 [nodemon] app crashed - waiting for file changes before starting...