mongo, 怎么在命令行插入seed数据
seed.sh
mongoimport --db myblog --collection articles --file ./articles.json -jsonArray
求解~~
把你的 seed.sh
改为 seed.bat
, 然后在命令行里直接 seed.bat
就可以了.
mongo, 怎么在命令行插入seed数据
seed.sh
mongoimport --db myblog --collection articles --file ./articles.json -jsonArray
求解~~
把你的 seed.sh
改为 seed.bat
, 然后在命令行里直接 seed.bat
就可以了.