Xameer
Xameer

Reputation: 31237

Express not listening on localhost:3000

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?

Upvotes: 0

Views: 1478

Answers (2)

Victor Parmar
Victor Parmar

Reputation: 5789

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

Upvotes: 1

Krzysztof Bargieł
Krzysztof Bargieł

Reputation: 143

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

Upvotes: 2

Related Questions