S
S
Sasha Yashchuk2019-05-01 14:29:53
JavaScript
Sasha Yashchuk, 2019-05-01 14:29:53

Why do Node.js projects use the www file?

Good afternoon! Tell me what and where to read or see, in order to understand why the bin folder with the www file is created in projects,
how to create it correctly, and the like. Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shvets, 2019-05-01
@Alex_bliznec

Well, firstly, it is not created everywhere, but only by some scaffolders, such as express-generator, koa-generator.
It's just a startup file, a linux executable file, with an indication (!#) to open it with node.js.
Historically, it is called www, but this is not necessary, in some frameworks it is not.
The launch is separated from app.js to be able to launch the express instance in a different way, for testing purposes for example.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question