0

So, we've built a basic express node website

express -c stylus express_example

Trying to run the app with DEBUG=express_example:* npm start

DEBUG=express_example:* npm start

With node DEBUG=express_example:* npm start

Also, tried inside node runtime:

DEBUG=express_example:* npm start inside node

http://localhost:3000/ is not connecting

enter image description here

Where are we wrong?

4
  • 1
    Can you show us some of your launch script ? Commented Oct 21, 2016 at 10:27
  • @Pogrindis What is the meaning of launch script Commented Oct 21, 2016 at 10:28
  • It's most likely the app.js file, need to see how express is being served and initialized. Commented Oct 21, 2016 at 10:28
  • 2
    I see, just to test github.com/shapeshed/express_example/blob/master/bin/www#L15 change this port var to = 3000; only.. and try again Commented Oct 21, 2016 at 10:32

2 Answers 2

2

You need to create a variable called DEBUG with set command. There is not command like DEBUG, it is a name of variable, so please try to run your server with set (to create variable):

set DEBUG=express_example:* & npm start

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

3 Comments

Good spot actually
@KrzysztofBargieł Yes, it worked!!! Thanks brotha! Can you educate me on what made you decide that DEBUG is not a command and it needs to be set.
@student It is a basic knowledge. You can check this out : technet.microsoft.com/en-us/library/cc754250(v=ws.11).aspx
1

Try

DEBUG='express_example:*' npm start 

Your environment variable was not getting set properly. Note that you can have many different environment variables this way

TEST=foo DEBUG='bar' npm start 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.