meteor是否有REPL?

Meteor框架是否带有REPL或某种控制台? 如果不是的话,有没有想法如何使用Node.js REPL来引导Meteor环境?

我基本上是在寻找像rails控制台,或在Web浏览器的JavaScript控制台:一个命令行界面,使应用程序的完整上下文可用,所以我可以任意检查像MeteorTemplate对象。

是的, 从1.0.2版开始,meteor就有了REPL 。

简单地使用meteor shell来放置到REPL,这与Node非常相似。

 $ meteor shell Welcome to the server-side interactive shell! Tab completion is enabled for global variables. Type .reload to restart the server and the shell. Type .exit to disconnect from the server and leave the shell. Type .help for additional help. > Meteor.isServer true > 

您将可以访问完整的Meteor环境,代码将像运行在服务器端的代码一样运行。

meteor目前没有REPL,但是它的路线图。 在此期间,您可以在浏览器的JavaScript控制台中访问应用程序的面向客户端的部分。

你可以inputmeteor mongo在你的本地开发数据库上打开一个MongoDB shell。 见http://docs.meteor.com/#meteormongo

您也可以在浏览器中打开控制台(在Chrome中,键入alt+command+i ),选项卡控制台。 在这里你可以inputjavascript命令,就像你在客户端上一样。

要直接向服务器发出命令,你可以尝试这个项目: meteor-server-console :

连接到meteor服务器,评估expression式或执行自定义帮助函数并浏览结果/日志输出。