Why can't I run my node.js express web application

Node.js and the express generator are really handy and simple to understand. I cannot however get my server to start by running c:\my-application-root>DEBUG=my-application ./bin/www

Windows doesn’t seem to understand that command. I can however run it by calling node ./bin/www

Am i missing something?

Upvotes: 9

Views: 6875

Answers (3)

Aussie Niki
Aussie Niki

Reputation: 108

1st command 'set DEBUG=my-application'.2nd command 'npm start'

Upvotes: 5

geoiq
geoiq

Reputation: 21

First you need to go the cmd that is supported by node (search for node cmd when you click in windows icon if you're using windows 7) type set DEBUG=my-application Second simply cd c:\my-application\bin\ Then type node www

www is the file that contains the script needed by node to run your server, DEBUG if set as an environment variable will also help you run node against it since the path will be known

Upvotes: 2

mscdex
mscdex

Reputation: 106746

Did you try set DEBUG=my-application followed by node ./bin/www? Windows does not allow setting an environment variable in the way that Linux and others do.

Upvotes: 20

Related Questions