It can be very useful for example for debuging apps on mojito (for example in webstorm, that requires js file to launch with node command) or for running in cluster etc. Now I use next solution: locally installed mojito, and mojito.js file created from standard mojito batch launcher. So I use commands like "node mojito start" or "node mojito create mojit" and it works. Probably good way, is to include such file in architypes?
I agree it would be good to have this ability. It shouldn't be hard -- probably just a matter of documenting how to do it.
Yes, it seems like it can/should be documented, but as I see situation, why not to do this out of the box, when this feature is so simple?
We do this daily -- I've asked Dirk to explain how.
Hi focuzz, you can do it like this:
% node --debug `which mojito` start
using whatever options for node or mojito accordingly. You can specify the path to mojito as well. For example if locally installed (i.e. npm i mojito) like:
npm i mojito
% node --debug node_modules/.bin/mojito start
I put "node_modules/.bin" in my $PATH, so the first form works in both cases.
mojito create app already creates an index.js and server.js. I agree these files should conform better to the use case you describe.
mojito create app
I believe Drew said that users will be able to start Mojito without 'mojito start' in the future. Should I add your instructions for starting Mojito without 'mojito start' to the docs or wait until Mojito offers a more standard way of doing it? If the latter, shouldn't this be an 'enhancement' issue (if it doesn't already exist) w/ a documentation element?
Right, I changed label to "enhancement" from "doc". As-is maybe it's a FAQ entry..
Thanks, Isao. Great, I'll add the issue of adding the FAQ entry to my sprint backlog.
Pull request #267 would allow you to use
$ node server.js
Sadly it doesn't honor the port option from application.json. Hopefully we can improve that.
pull #422 should land soon, and make mojito start more node-ish and node-hosting friendly