Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Right-clicking on the project root to launch (use package.json main defininition). was: A new "Run As" procedure that loads Express 4 application from ./bin/www #163

Open
ghost opened this issue Sep 15, 2014 · 5 comments

Comments

@ghost
Copy link

ghost commented Sep 15, 2014

Related to issues #161 and #162: a new "Run As" procedure that loads Express 4 application from ./bin/www as Express 4 projects are now initialized and loaded from a 'www' script

($ node app.js won't work anymore...)

@paulvi
Copy link
Member

paulvi commented Sep 15, 2014

So I guess the command is now "$ node ./bin/www" ?
Nodeclipse does have notation of Express project once it is created. How to impose that that command is to be used?

Running via npm is bad, as debugging becomes other issue #153

BTW I am busy with Android now, so I don't look into Node.js often.

@ghost
Copy link
Author

ghost commented Sep 15, 2014

I agree: $npm start is not the correct way.

$ node ./bin/www (node only once) is going to node.js more directly and it's documented in the new project's package.json in its start section if the project was generated by express command line tool: that would be the correct way to go.

@paulvi
Copy link
Member

paulvi commented Sep 15, 2014

That would require parsing package.json in Java to get that value first.

@paulvi
Copy link
Member

paulvi commented Sep 25, 2014

For now adding ability to run www file with Node.

BTW, just copy www into start.js like below and this is correct entry point

console.log('starting Express server');
var debug = require('debug')('NodeExpress43');
var app = require('./app');

app.set('port', process.env.PORT || 3000);

var server = app.listen(app.get('port'), function() {
  debug('Express server listening on port ' + server.address().port);
});

@paulvi
Copy link
Member

paulvi commented Oct 23, 2014

Generally it would make sense to lauch when right-clicking on the project root.

That would work for any project that has package.json with man defined.

@paulvi paulvi changed the title A new "Run As" procedure that loads Express 4 application from ./bin/www Right-clicking on the project to launch (use package.json man defininition). was: A new "Run As" procedure that loads Express 4 application from ./bin/www Oct 23, 2014
@paulvi paulvi removed the wontfix label Oct 23, 2014
@paulvi paulvi changed the title Right-clicking on the project to launch (use package.json man defininition). was: A new "Run As" procedure that loads Express 4 application from ./bin/www Right-clicking on the project root to launch (use package.json man defininition). was: A new "Run As" procedure that loads Express 4 application from ./bin/www Oct 23, 2014
@paulvi paulvi changed the title Right-clicking on the project root to launch (use package.json man defininition). was: A new "Run As" procedure that loads Express 4 application from ./bin/www Right-clicking on the project root to launch (use package.json main defininition). was: A new "Run As" procedure that loads Express 4 application from ./bin/www Nov 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant