我刚创建了一个新的流星(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