Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meteor.js - can I drop into a Meteor shell to try out some JavaScript in my Meteor environment?

I often develop in Python and sometimes find it useful to type python at the terminal prompt and drop into a Python shell where I can import various modules and test some behavior. Node.js has similar functionality if I type node at the command line.

I'd like to do the same now that I'm developing with Meteor. How can I get to a shell prompt where all the packages I have added with meteor add are loaded and ready for me to play with?

like image 420
tadasajon Avatar asked Nov 23 '25 10:11

tadasajon


2 Answers

Just install node-inspector and then you can easily use the node-debug command to run node-debug mrt. That should open a debugger console.

You can then just drop a debugger; keyword onto a line anywhere in your code to drop into a REPL like setting.

like image 199
Josh Owens Avatar answered Nov 24 '25 22:11

Josh Owens


As of recently, meteor shell will give you a REPL into the server process. Of course, you know this @JoshOwens, I think I heard about this on your podcast :)

like image 36
Dean Radcliffe Avatar answered Nov 25 '25 00:11

Dean Radcliffe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!