Ask coding questions

← Back to all posts
MongoDB
dillonjoshua68 (72)

What do we put for the IP address in the .MongoClient() method... is it always

import pymongo
myclient = pymongo.MongoClient(“mongodb://localhost:27017/“)

Or what else can we put instead of localhost:27017

Comments
hotnewtop
PattanAhmed (1412)

@dillonjoshua68 Hi,
Read this amazing website:-
Click here
You can find MongoDB in Repl.it in the above website

Hope this helps
Please mark my answer if this helps

ironblockhd (427)

I think replit doesnt support mongodb servers, try to use an external database as shown here.

or use repldb after you activate explorer role here

dillonjoshua68 (72)

u sure? cuz the pymongo module is there? @ironblockhd

codingmasters (0)

@dillonjoshua68 Very sure. pymongo works perfectly well on Visual Studio Code.