-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expressjs-sourceCode-application.js/express.js #123
Labels
Comments
|
yaofly2012
changed the title
expressjs-sourceCode-application
expressjs-sourceCode-application.js/express.js
Mar 21, 2020
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
express.js
模块express的入口,暴露顶层的API和类型。
1.
createApplication
函数express对外暴露的最顶层对象(也是函数)
exports
和module.exports
的一致性,即使全局只导出一个变量(如Express里只导出createApplication
函数)。2.
createApplication
函数逻辑用来创建express aplication的。
app
是个函数,只不过挂载了一些“继承”的属性和方法;app
函数是requestListener,是一个express app处理req的入口。app
采用mixin
方式继承application
模块和EventEmitter.prototype
的属性和方法。2.2 Issues
app.request/response
的用处 ?The text was updated successfully, but these errors were encountered: