Hello Thapa sir can you tell me how to connect our database using ms sql server when i connect some issue facing like connect refuse and ssl please tell me how can be solve and tell me with how to connect mysql database
Sir my question.Register fome to user and send data using two database used condition is normal data save mongoose and image or video AWS S3 bucket Sir please help me
3 youtuber ki video dek chukaa hu lekin ye moongoes mere mongo se abhi tak connect nahi huaa 😔 ye duniya koi help nahi karta god ko chod ke mere jo dost website benate vo bhi meri help nahi karte but koi problem meri hai to soulution bhi me hi keruga niche vali duniya sath de to kya huaa vo begwan to mere sath hai me aage bedta rehuga hare krishna
Node.js v18.17.1 [nodemon] app crashed - waiting for file changes before starting... mera to ye error resolve nahi ho raha . bekar hai kisi aur ki dekho bhai
// Option 1: Move definition to the top const express = require('express'); const app = express(); // Other imports (if any) // Define products_routes here (before app.use) const products_routes = require('./products_routes'); // Assuming products_routes is in a separate file app.use('/products', products_routes); // Other app configuration code app.listen(3000, () => { console.log('Server listening on port 3000'); }); use link this u have done some mistake i thing
//solution of issue while connecting to MongoDB I just had this problem knowing that I was using the correct username, password, and DBname. I tried to change the password for the db user to double-check, but it still didn't work. Instead, I created a new user, gave the user admin role, set the password, etc, and then used that new user and password (same dbname) for the connection, which worked. I don't know exactly what the issue was, but hoping it can help some of you save some time :) #copied
Sir apne apne html form wale video me mongodb se connection to kiya hi nhi hai to usme data insert kaise ho raha hai. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-XZiFBlfluZk.html Is wale video me.
how solve it MongoAPIError: URI must include hostname, domain name, and tld at resolveSRVRecord (D:\intern\RVAPI ode_modules\mongodb\lib\connection_string.js:37:15) at MongoClient._connect (D:\intern\RVAPI ode_modules\mongodb\lib\mongo_client.js:140:74) at MongoClient.connect (D:\intern\RVAPI ode_modules\mongodb\lib\mongo_client.js:119:40) at _createMongoClient (D:\intern\RVAPI ode_modules\mongoose\lib\connection.js:895:16) at NativeConnection.openUri (D:\intern\RVAPI ode_modules\mongoose\lib\connection.js:742:29) at Mongoose.connect (D:\intern\RVAPI ode_modules\mongoose\lib\index.js:406:15) at connectDB (D:\intern\RVAPI\db\connect.js:10:30) at start (D:\intern\RVAPI\app.js:21:15) at Object. (D:\intern\RVAPI\app.js:31:5) at Module._compile (node:internal/modules/cjs/loader:1149:14) { [Symbol(errorLabels)]: Set(0) {}
//when it is on it give me a error // await connectDB(); app.listen(PORT, () => { console.log(`${PORT} Yes, I am Connected`); }); } catch (error) { console.log(error); } }; start();
below is more simple way to connect server with db. You only need to add two lines of codes and add one file name .env and paste your string into it. const dotenv = require("dotenv").config() const express = require("express"); const app = express(); const mongoose = require("mongoose"); const PORT = process.env.PORT || 5000 app.get('/', (req, res) => { res.send('hello world') }); mongoose .connect(process.env.MONGO_URI) .then(() => { app.listen(PORT, (() => { console.log(`server running on port ${PORT}`); })) }) .catch((error) => console.log(error));
How to Remove this waring from Terminal Please -> (node:19516) [MONGOOSE] DeprecationWarning: Mongoose: the `strictQuery` option will be switched back to `false` by default in Mongoose 7. Use `mongoose.set('strictQuery', false);` if you want to prepare for this change. Or use `mongoose.set('strictQuery', true);` to suppress this warning. (Use `node --trace-deprecation ...` to show where the warning was created)
Getting below error when try to connect " const connectDB = require("./db/connect")" C:\myapp\demoapi ode_modules\mongodb\lib\operations\add_user.js:16 this.options = options ?? {}; ^ SyntaxError: Unexpected token '?' at wrapSafe (internal/modules/cjs/loader.js:915:16) at Module._compile (internal/modules/cjs/loader.js:963:27) 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 Module.require (internal/modules/cjs/loader.js:887:19) at require (internal/modules/cjs/helpers.js:74:18) at Object. (C:\myapp\demoapi ode_modules\mongodb\lib\admin.js:4:20) at Module._compile (internal/modules/cjs/loader.js:999:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) [nodemon] app crashed - waiting for file changes before starting...