Can't Start Node App from Terminal

I'm wondering why I can't just run my node/express app by typing "node app.js" in the terminal within Webstorm after trying to run the BoilerPlate Node Express webstorm generated project out of the box.  I got it running ok by clicking Play but I like the command-line.

So:

1) why can't I just do that?  am I missing something?

    here's what I got when I tried:

     Screen Shot 2015-05-26 at 1.03.01 AM.png
        it didn't do anything!  why?  I remember creating a blank project and putting in express and being able to do this with no problem and seeing that it's listening (writing out the colsole) right in the terminal like normal but can't do it with your project?

2) What's the advantage to using the GUI to click play instead
Screen Shot 2015-05-26 at 12.45.15 AM.png

1 comment
Comment actions Permalink

You need using 'www' script to start Express 4.* application. Please cd to the project root directory and then run 'node bin\www' or 'npm start' there.
See https://github.com/expressjs/generator/issues/25, http://stackoverflow.com/questions/23169941/what-does-bin-www-do-in-express-4-x

0

Please sign in to leave a comment.