Standard way to start mojito with node command #265

Closed
focuzz opened this Issue Jul 12, 2012 · 9 comments

7 participants

@focuzz

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?

@drewfish
Yahoo Inc. member

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.

@focuzz

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?

@rwaldura

We do this daily -- I've asked Dirk to explain how.

@isao

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:

% 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.

HTH,

Isao

@zhouyaoji zhouyaoji was assigned Jul 12, 2012
@zhouyaoji

Isao,

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?

@isao

Right, I changed label to "enhancement" from "doc". As-is maybe it's a FAQ entry..

@zhouyaoji

Thanks, Isao. Great, I'll add the issue of adding the FAQ entry to my sprint backlog.

@FabianFrank

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.

@mojit0 mojit0 was assigned Aug 17, 2012
@isao

pull #422 should land soon, and make mojito start more node-ish and node-hosting friendly

@isao isao closed this Sep 25, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment