Oscar
Oscar

Reputation: 13960

NodeJs: Express app don't start in windows

I'm just starting with node.js and express framework, following this tutorial:

http://expressjs.com/starter/generator.html

After running in console express myapp and cd myapp && npm install when I run node app.js nothing happens. The command returns immediately, while I was expecting it to wait for incoming messages. No error are shown either. I'm on Windows 7 x64 and the commands are run from an ADMIN console. Any help will be appreciated.

Upvotes: 7

Views: 5146

Answers (4)

Stefano Tucci
Stefano Tucci

Reputation: 1

Before you execute

express myapp

you have to execute

npm install express-generator -g

Upvotes: 0

salman fakhri
salman fakhri

Reputation: 43

after you cd myapp && npm install try

npm start

Upvotes: 3

Max
Max

Reputation: 8836

The tutorial says to run

set DEBUG=myapp & node ./bin/www

You don't run it with

node app.js

in express v4.x

Upvotes: 5

mss
mss

Reputation: 64

Try executing commands from 'Node.js command prompt' or ' C:\Program Files\Nodejs'.

If it says 'node' is not recognized as an internal or external command'

Try adding C:\Program Files\Nodejs to your PATH environment variable.

On the command prompt, the command would be set PATH=%PATH%;C:\Program Files\Nodejs.

Upvotes: 0

Related Questions