Why I can not start my node.js express web application

Node.js and the express generator are really convenient and clear. However, I cannot start my server by running c: \ my-application-root> DEBUG = my-application./bin/www

Windows does not seem to understand this command. However, I can run it by calling node./bin/www

Am I missing something?

+8
express
source share
3 answers

Have you tried set DEBUG=my-application and then node ./bin/www ? Windows does not allow you to set an environment variable like Linux and others do.

+19
source share

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

+4
source share

First you need to go to cmd, which is supported by node (search for node cmd when clicking on the Windows icon if you are using Windows 7) type set DEBUG = my application is second just cd c: \ my-application \ bin \ Then enter node www

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

+2
source share

All Articles