作业1-示例
从Mongo到UI的数据分配1的示例
###要启动并运行它:
将位于data_sample文件夹中的data.json文件导入mongo。
cd进入data_sample目录: cd data_sample
在命令行提示符处(不在mongo shell中)使用以下命令:
mongoimport --db graph-data-db --collection graph-data-collection --type json --file data.json --jsonArray
启动Mongo守护程序:
mongod --smallfiles
检查以确保您具有数据:
通过在命令提示符下键入mongo启动mongo shell客户端
键入use graph-data-db
键入db['graph-data-collection'].find({}).pret