mongo_dart Dart的MongoDB驱动程序

时间:2019-01-25 12:49:52

标签: flutter mangodb

我只是尝试连接到我的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');
}

任何建议

在此处输入图片说明 enter image description here

0 个答案:

没有答案