9

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?

2
  • What error do you get? Commented May 19, 2014 at 0:23
  • 'DEBUG' is not recognized as an internal or external command, operable program or batch file Commented May 19, 2014 at 7:21

3 Answers 3

20

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.

Sign up to request clarification or add additional context in comments.

1 Comment

ah, yes. that is the reason. I knew it was more an OS thing and not an application issue
5

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

2 Comments

what does npm start do here?
this run the npm provided package
2

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.