我剛創建了一個新的流星(1.2.1)項目像這樣(的Debian 7.7)本地的MongoDB服務器,但我不能進入蒙戈終端:蒙戈:流星沒有運行
$ meteor create test
$ cd test
$ meteor run
[[[[[ ~/test ]]]]]
=> Started proxy.
=> Started MongoDB.
=> Started your app.
=> App running at: http://localhost:3000/
,並在新的終端:
$ meteor mongo
mongo: Meteor isn't running a local MongoDB server.
This command only works while Meteor is running your application locally.
Start your application first with 'meteor' and then run this
command in a new terminal. This error will also occur if you asked Meteor to
use a different MongoDB server with $MONGO_URL when you ran your
application.
If you're trying to connect to the database of an app you deployed with
'meteor deploy', specify your site's name as an argument to this
command.
是的,它運行的是本地的MongoDB服務器! 這裏有什麼問題,我該怎麼辦? $MONGO_URL
是空的btw。雖然mongodb已安裝,但未使用(只需要mongodump和mongorestore連接到流星的mongo)。
感謝
以上4個命令,你是否在一個終端會話中按順序運行它們?你是否在運行'meteor mongo'之前停止了'meteor run'命令(例如'Cmd-C')?如果是這樣,這不起作用,因爲那時流星沒有運行。你需要在一個新的終端中運行'meteor mongo',同時'流星運行'仍在執行。 否則,請檢查'echo $ MONGO_URL'顯示的內容。 – JeremyK
是的,我啓動了一個新的終端,而流星跑,抱歉,這不清楚。 – quape
$ MONGO_URL是空的btw – quape