On Nov 20, 2012, at 21:37, Jerry <[email protected]> wrote:

> I have install node.js v0.8.4 on Redhat, however, I use node server.js, there 
> is no any output in terminal.
> 
> server.js. 
> console.log('hello');
> 
> however, if I input only node instead of node server.js, then input 
> console.log("hello");, it will output in command line, 
> What's the reason. Thanks!

When you just type "node", it runs the node repl, which is an interactive 
environment into which you can type JavaScript commands and see them executed:

http://nodejs.org/api/repl.html

When you type "node server.js", node does not run the repl; instead, it runs 
the code you've written in server.js.


-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to