我只是尝试连接到我的MangoDB。来自flutter App ..,但出现错误
" SocketException: OS Error: Connection refused, errno = 111, address = 127.0.0.1, port = 46046 "
我的代码:-
import 'package:mongo_dart/mongo_dart.dart';
main() async {
Db db = new Db("mongodb://127.0.0.1:27017/chat");
await db.open();
print('''Hii ''');
await db.close();
print('closing db');
}
任何建议