why bin\www is not a js file?

2.1k views Asked by At

There are questions and answers dealing with the new www file in the folder bin for express 4. However I could not find the current question: Why eventhough www is a javascript file, it does not have the js extension?

1

There are 1 answers

0
Cody Geisler On

I imagine that the maintainer of express uses many executable shell scripts, which are generally left without the extension. And since you're executing this as a node script, it is also an executable. See https://askubuntu.com/questions/503127/should-i-save-my-scripts-with-the-sh-extension

You can add the extension, everything should still work.

And as an aside, the reason for using the bin/www instead of running app.js directly: Learning node.js/express.js: What's the deal with bin/www?