I just started learning Node Js. When I downloaded the finished project, I saw that in the bin folder there is a file named "www" without extension. But JS scripts are written in it. It turns out the package nodemon starts this file with the help of the command "npm run start". I am surprised. The project is working fine. The question is: can I not specify the js file extension

  • the file extension is only needed to associate with it any program that can use it. The program itself is indifferent to the presence or absence of an extension, the only important thing is the presence of a file at the specified address. - Grundy
  • @Grundy Doesn't always make a difference. From personal experience: Word refuses to open WebDAV docx files if they do not have the .docx extension - Yaant
  • @Yaant, what if just file-> open? By the way, writes some specific error? - Grundy
  • @Grundy Via File-> Open works, but we had to start word and open the file by clicking on the link in the browser. And he writes simply - "An unexpected error has occurred." - Yaant
  • Suppose we create a file with html elements. And we specify the extensions as txt. Then open with a browser. This moment we will see as text and not as web pages. Is not it. Or just the browser reads like this. - Murat Erkin

0