问题描述
我看过Express.js的教程,例如此,该教程从头开始有自己的app.js
文件,并使用快速生成器放弃.
I've seen tutorials for express.js such as this which starts from scratch with their own app.js
file and forgoes using the express generator.
我的问题:对于试图掌握如何使用这些工具并制作基本Web应用程序的初学者,我应该关注bin/www
还是应该在app.js
中定义端口?
My question: for beginner who's trying to grasp just how to use these tools and make a basic web application should I be concerned with bin/www
or should I just be defining the port within app.js
?
我目前在bin/www
中唯一了解的功能是设置端口. Express生成器是否只是在边缘盒功能上肿了,而这对于初学者来说太多了?
The only functionality I currently understand in bin/www
is setting the port. Is the express generator simply bloated with edge case functionality which is too much for a beginner?
推荐答案
这是原因,由快递维护人员简洁地指出:
Here is the reason, stated succinctly by an express maintainer:
这篇关于学习node.js/express.js:bin/www处理了什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!