Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Standard way to start mojito with node command #265

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

Standard way to start mojito with node command #265

focuzz opened this issue Jul 12, 2012 · 9 comments

Comments

@focuzz
Copy link

focuzz commented Jul 12, 2012

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
Copy link
Contributor

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
Copy link
Author

focuzz commented Jul 12, 2012

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
Copy link
Contributor

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

@isao
Copy link
Contributor

isao commented Jul 12, 2012

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

@ghost ghost assigned zhouyaoji Jul 12, 2012
@zhouyaoji
Copy link
Contributor

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
Copy link
Contributor

isao commented Jul 13, 2012

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

@zhouyaoji
Copy link
Contributor

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

@FabianFrank
Copy link
Contributor

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.

@ghost ghost assigned mojit0 Aug 17, 2012
@isao
Copy link
Contributor

isao commented Sep 13, 2012

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

@isao isao closed this as completed Sep 25, 2012
mojit0 added a commit that referenced this issue Sep 26, 2012
Cleansed startup process.

Feature: Can now start using mojito start or npm start consistently.
Feature: Runs properly for hosting services such as Heroku.
Feature: Reads process.env for PORT value.

Fix: Issue #265
Fix: Issue #267

Thanks to @FabianFrank for initial debugging of Heroku/Nodejitsu issues.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants