Are you over 18 and want to see adult content?
6
More Annotations
A complete backup of enigmaglobal.com
enigmaglobal.com
Are you over 18 and want to see adult content?
A complete backup of playersrevenge.com
playersrevenge.com
Are you over 18 and want to see adult content?
4
A complete backup of guerillawire.org
guerillawire.org
Are you over 18 and want to see adult content?
A complete backup of levisbuildingcomponents.com
levisbuildingcomponents.com
Are you over 18 and want to see adult content?
4
Favourite Annotations
A complete backup of gorka-narodowa.pl
gorka-narodowa.pl
Are you over 18 and want to see adult content?
6
5
Text
EGG - BORN TO BUILD BETTER ENTERPRISE FRAMEWORKS AND APPSGUIDEAPITUTORIALSBUILT-IN OBJECTSMIGRATION TO 2.XSOCKET.IO Born to build. better enterprise frameworks and apps with Node.js & Koa. 为企业级框架和应用而生. Get Started GitHub. 第十五届 D2 前端技术论坛
QUICK START
#Step by Step. Usually you can just use npm init egg of the previous section, choose a scaffold that best fits your business model and quickly generate a project, then get started with the development.. However, in this section, instead of using scaffolds we will build a project called Egg HackerNews step by step, for a better understandingof how it works.
FRAMEWORK BUILT-IN OBJECTS Framework Built-in Objects. At this chapter, we will introduce some built-in basic objects in the framework, including four objects (Application, Context, Request, Response) inherited from Koa and some objects that extended by the framework (Controller, Service , Helper, Config, Logger), we will often see them in the follow-up documents. SEQUELIZE - BORN TO BUILD BETTER ENTERPRISE FRAMEWORKS AND Sequelize. In the previous section, we showed how to access the database through the egg-mysql plugin in the framework. In some more complex applications, we may need an ORM framework to help us manage the data layer code. In the Node.js community, sequelize is a widely used ORM framework that supports multiple data sources such as MySQL, PostgreSQL, SQLite, and MSSQL. MIDDLEWARE - BORN TO BUILD BETTER ENTERPRISE FRAMEWORKS Middleware. In the previous chapter, we say that Egg is based on Koa, so the form of middleware in Egg is the same as in Koa, i.e. they are both based on the onion model. # Writing Middleware # How to Write Let's take a look at how to write a middleware from a simple gzipexample.
EGG - 为企业级框架和应用而生TRANSLATE THIS PAGE Born to build. better enterprise frameworks and apps with Node.js & Koa. 为企业级框架和应用而生. 开始使用 GitHub. 第十五届 D2 前端技术论坛·无界 >EGG.JS 是什么?
Egg.js 是什么? Egg.js 为企业级框架和应用而生,我们希望由 Egg.js 孕育出更多上层框架,帮助开发团队和开发人员降低开发和维护成本。. 注:Egg.js 缩写为 Egg # 设计原则 我们深知企业级应用在追求规范和共建的同时,还需要考虑如何平衡不同团队之间的差异,求同存异。启动自定义
启动自定义.
我们常常需要在应用启动期间进行一些初始化工作,等初始化完成后应用才可以启动成功,并开始对外提供服务。. 框架提供了统一的入口文件( app.js )进行启动过程自定义,这个文件返回一个 Boot 类,我们可以通过定义 Boot 类中的生命周期方法来EGG-ONERROR
$ npm i egg-onerror # Usage Usage. egg-onerror is on by default in egg. But you still can configure its properties to fits yourscenarios.
前置代理模式
前置代理模式.
一般来说我们的服务都不会直接接受外部的请求,而会将服务部署在接入层之后,从而实现多台机器的负载均衡和服务的平滑发布,保证高可用。. 在这个场景下,我们无法直接获取到真实用户请求的连接,从而无法确认用户的真实IP,请求协议
EGG - BORN TO BUILD BETTER ENTERPRISE FRAMEWORKS AND APPSGUIDEAPITUTORIALSBUILT-IN OBJECTSMIGRATION TO 2.XSOCKET.IO Born to build. better enterprise frameworks and apps with Node.js & Koa. 为企业级框架和应用而生. Get Started GitHub. 第十五届 D2 前端技术论坛QUICK START
#Step by Step. Usually you can just use npm init egg of the previous section, choose a scaffold that best fits your business model and quickly generate a project, then get started with the development.. However, in this section, instead of using scaffolds we will build a project called Egg HackerNews step by step, for a better understandingof how it works.
FRAMEWORK BUILT-IN OBJECTS Framework Built-in Objects. At this chapter, we will introduce some built-in basic objects in the framework, including four objects (Application, Context, Request, Response) inherited from Koa and some objects that extended by the framework (Controller, Service , Helper, Config, Logger), we will often see them in the follow-up documents. SEQUELIZE - BORN TO BUILD BETTER ENTERPRISE FRAMEWORKS AND Sequelize. In the previous section, we showed how to access the database through the egg-mysql plugin in the framework. In some more complex applications, we may need an ORM framework to help us manage the data layer code. In the Node.js community, sequelize is a widely used ORM framework that supports multiple data sources such as MySQL, PostgreSQL, SQLite, and MSSQL. MIDDLEWARE - BORN TO BUILD BETTER ENTERPRISE FRAMEWORKS Middleware. In the previous chapter, we say that Egg is based on Koa, so the form of middleware in Egg is the same as in Koa, i.e. they are both based on the onion model. # Writing Middleware # How to Write Let's take a look at how to write a middleware from a simple gzipexample.
EGG - 为企业级框架和应用而生TRANSLATE THIS PAGE Born to build. better enterprise frameworks and apps with Node.js & Koa. 为企业级框架和应用而生. 开始使用 GitHub. 第十五届 D2 前端技术论坛·无界 >EGG.JS 是什么?
Egg.js 是什么? Egg.js 为企业级框架和应用而生,我们希望由 Egg.js 孕育出更多上层框架,帮助开发团队和开发人员降低开发和维护成本。. 注:Egg.js 缩写为 Egg # 设计原则 我们深知企业级应用在追求规范和共建的同时,还需要考虑如何平衡不同团队之间的差异,求同存异。启动自定义
启动自定义.
我们常常需要在应用启动期间进行一些初始化工作,等初始化完成后应用才可以启动成功,并开始对外提供服务。. 框架提供了统一的入口文件( app.js )进行启动过程自定义,这个文件返回一个 Boot 类,我们可以通过定义 Boot 类中的生命周期方法来EGG-ONERROR
$ npm i egg-onerror # Usage Usage. egg-onerror is on by default in egg. But you still can configure its properties to fits yourscenarios.
前置代理模式
前置代理模式.
一般来说我们的服务都不会直接接受外部的请求,而会将服务部署在接入层之后,从而实现多台机器的负载均衡和服务的平滑发布,保证高可用。. 在这个场景下,我们无法直接获取到真实用户请求的连接,从而无法确认用户的真实IP,请求协议
TUTORIALS - BORN TO BUILD BETTER ENTERPRISE FRAMEWORKS AND Build in egg-view as template engine solution and support multiple render, which is called by plugin but keeping the consistent render API. Refer to how to use templates ,More details on template plugin development. Template engines available as shown below. For more template engines searching. egg-view-nunjucks. egg-view-ejs.BUILD RESTFUL API
Build RESTful API. Web frameworks are widely used for providing interfaces to the client through Web services. Let's use an example CNode Club to show how to build RESTful API using Egg. CNode currently use v1 interface is not fully consistent with the RESTful semantic. In the article, we will encapsulate a more RESTful semantic V2 API basedon
ROUTER - BORN TO BUILD BETTER ENTERPRISE FRAMEWORKS AND APPS This simplest Router is done by now, when users do the request GET /user/123, the info function in user.js will be invoked. # Router Config in Detail Below is the complete definition of router, parameters can be determined depending on different scenes.应用部署
JavaScript
语言本身不需要编译的,构建过程主要是下载依赖。. 但如果使用 TypeScript 或者 Babel 支持 ES6 以上的特性,那就必须要这一步了。. 一般安装依赖会指定 NODE_ENV=production 或 npm install --production 只安装 dependencies 的依赖。. 因为 devDependencies 中的模块过大而且EGG-ONERROR
$ npm i egg-onerror # Usage Usage. egg-onerror is on by default in egg. But you still can configure its properties to fits yourscenarios.
启动自定义
启动自定义.
我们常常需要在应用启动期间进行一些初始化工作,等初始化完成后应用才可以启动成功,并开始对外提供服务。. 框架提供了统一的入口文件( app.js )进行启动过程自定义,这个文件返回一个 Boot 类,我们可以通过定义 Boot 类中的生命周期方法来定时任务
这个定时任务会在每一个 Worker 进程上每 1 分钟执行一次,将远程数据请求回来挂载到 app.cache 上。 # 任务 task 或 subscribe 同时支持 generator function 和 async function。; task 的入参为 ctx,匿名的 Context 实例,可以通过它调用 service 等。 # 定时方式 定时任务可以指定 interval 或者 cron 两种不同的前置代理模式
前置代理模式.
一般来说我们的服务都不会直接接受外部的请求,而会将服务部署在接入层之后,从而实现多台机器的负载均衡和服务的平滑发布,保证高可用。. 在这个场景下,我们无法直接获取到真实用户请求的连接,从而无法确认用户的真实IP,请求协议
单元测试
#测试运行工具. 统一使用 egg-bin 来运行测试脚本, 自动将内置的 Mocha、co-mocha、power-assert,nyc 等模块组合引入到测试脚本中, 让我们聚焦精力在编写测试代码上,而不是纠结选择那些测试周边工具和模块。. 只需要在 package.json 上配置好 scripts.test 即可。 框架内置基础对象 框架内置基础对象. 在本章,我们会初步介绍一下框架中内置的一些基础对象,包括从 Koa 继承而来的 4 个对象(Application, Context, Request, Response) 以及框架扩展的一些对象(Controller, Service,Helper, Config,
Logger),在后续的文档阅读中我们会经常遇到它们。. EGG - BORN TO BUILD BETTER ENTERPRISE FRAMEWORKS AND APPSGUIDEAPITUTORIALSBUILT-IN OBJECTSMIGRATION TO 2.XSOCKET.IO Born to build. better enterprise frameworks and apps with Node.js & Koa. 为企业级框架和应用而生. Get Started GitHub. 第十五届 D2 前端技术论坛QUICK START
#Step by Step. Usually you can just use npm init egg of the previous section, choose a scaffold that best fits your business model and quickly generate a project, then get started with the development.. However, in this section, instead of using scaffolds we will build a project called Egg HackerNews step by step, for a better understandingof how it works.
FRAMEWORK BUILT-IN OBJECTS Framework Built-in Objects. At this chapter, we will introduce some built-in basic objects in the framework, including four objects (Application, Context, Request, Response) inherited from Koa and some objects that extended by the framework (Controller, Service , Helper, Config, Logger), we will often see them in the follow-up documents. SEQUELIZE - BORN TO BUILD BETTER ENTERPRISE FRAMEWORKS AND Sequelize. In the previous section, we showed how to access the database through the egg-mysql plugin in the framework. In some more complex applications, we may need an ORM framework to help us manage the data layer code. In the Node.js community, sequelize is a widely used ORM framework that supports multiple data sources such as MySQL, PostgreSQL, SQLite, and MSSQL. MIDDLEWARE - BORN TO BUILD BETTER ENTERPRISE FRAMEWORKS Middleware. In the previous chapter, we say that Egg is based on Koa, so the form of middleware in Egg is the same as in Koa, i.e. they are both based on the onion model. # Writing Middleware # How to Write Let's take a look at how to write a middleware from a simple gzipexample.
EGG - 为企业级框架和应用而生TRANSLATE THIS PAGE Born to build. better enterprise frameworks and apps with Node.js & Koa. 为企业级框架和应用而生. 开始使用 GitHub. 第十五届 D2 前端技术论坛·无界 >EGG.JS 是什么?
Egg.js 是什么? Egg.js 为企业级框架和应用而生,我们希望由 Egg.js 孕育出更多上层框架,帮助开发团队和开发人员降低开发和维护成本。. 注:Egg.js 缩写为 Egg # 设计原则 我们深知企业级应用在追求规范和共建的同时,还需要考虑如何平衡不同团队之间的差异,求同存异。启动自定义
启动自定义.
我们常常需要在应用启动期间进行一些初始化工作,等初始化完成后应用才可以启动成功,并开始对外提供服务。. 框架提供了统一的入口文件( app.js )进行启动过程自定义,这个文件返回一个 Boot 类,我们可以通过定义 Boot 类中的生命周期方法来EGG-ONERROR
$ npm i egg-onerror # Usage Usage. egg-onerror is on by default in egg. But you still can configure its properties to fits yourscenarios.
前置代理模式
前置代理模式.
一般来说我们的服务都不会直接接受外部的请求,而会将服务部署在接入层之后,从而实现多台机器的负载均衡和服务的平滑发布,保证高可用。. 在这个场景下,我们无法直接获取到真实用户请求的连接,从而无法确认用户的真实IP,请求协议
EGG - BORN TO BUILD BETTER ENTERPRISE FRAMEWORKS AND APPSGUIDEAPITUTORIALSBUILT-IN OBJECTSMIGRATION TO 2.XSOCKET.IO Born to build. better enterprise frameworks and apps with Node.js & Koa. 为企业级框架和应用而生. Get Started GitHub. 第十五届 D2 前端技术论坛QUICK START
#Step by Step. Usually you can just use npm init egg of the previous section, choose a scaffold that best fits your business model and quickly generate a project, then get started with the development.. However, in this section, instead of using scaffolds we will build a project called Egg HackerNews step by step, for a better understandingof how it works.
FRAMEWORK BUILT-IN OBJECTS Framework Built-in Objects. At this chapter, we will introduce some built-in basic objects in the framework, including four objects (Application, Context, Request, Response) inherited from Koa and some objects that extended by the framework (Controller, Service , Helper, Config, Logger), we will often see them in the follow-up documents. SEQUELIZE - BORN TO BUILD BETTER ENTERPRISE FRAMEWORKS AND Sequelize. In the previous section, we showed how to access the database through the egg-mysql plugin in the framework. In some more complex applications, we may need an ORM framework to help us manage the data layer code. In the Node.js community, sequelize is a widely used ORM framework that supports multiple data sources such as MySQL, PostgreSQL, SQLite, and MSSQL. MIDDLEWARE - BORN TO BUILD BETTER ENTERPRISE FRAMEWORKS Middleware. In the previous chapter, we say that Egg is based on Koa, so the form of middleware in Egg is the same as in Koa, i.e. they are both based on the onion model. # Writing Middleware # How to Write Let's take a look at how to write a middleware from a simple gzipexample.
EGG - 为企业级框架和应用而生TRANSLATE THIS PAGE Born to build. better enterprise frameworks and apps with Node.js & Koa. 为企业级框架和应用而生. 开始使用 GitHub. 第十五届 D2 前端技术论坛·无界 >EGG.JS 是什么?
Egg.js 是什么? Egg.js 为企业级框架和应用而生,我们希望由 Egg.js 孕育出更多上层框架,帮助开发团队和开发人员降低开发和维护成本。. 注:Egg.js 缩写为 Egg # 设计原则 我们深知企业级应用在追求规范和共建的同时,还需要考虑如何平衡不同团队之间的差异,求同存异。启动自定义
启动自定义.
我们常常需要在应用启动期间进行一些初始化工作,等初始化完成后应用才可以启动成功,并开始对外提供服务。. 框架提供了统一的入口文件( app.js )进行启动过程自定义,这个文件返回一个 Boot 类,我们可以通过定义 Boot 类中的生命周期方法来EGG-ONERROR
$ npm i egg-onerror # Usage Usage. egg-onerror is on by default in egg. But you still can configure its properties to fits yourscenarios.
前置代理模式
前置代理模式.
一般来说我们的服务都不会直接接受外部的请求,而会将服务部署在接入层之后,从而实现多台机器的负载均衡和服务的平滑发布,保证高可用。. 在这个场景下,我们无法直接获取到真实用户请求的连接,从而无法确认用户的真实IP,请求协议
TUTORIALS - BORN TO BUILD BETTER ENTERPRISE FRAMEWORKS AND Build in egg-view as template engine solution and support multiple render, which is called by plugin but keeping the consistent render API. Refer to how to use templates ,More details on template plugin development. Template engines available as shown below. For more template engines searching. egg-view-nunjucks. egg-view-ejs.BUILD RESTFUL API
Build RESTful API. Web frameworks are widely used for providing interfaces to the client through Web services. Let's use an example CNode Club to show how to build RESTful API using Egg. CNode currently use v1 interface is not fully consistent with the RESTful semantic. In the article, we will encapsulate a more RESTful semantic V2 API basedon
ROUTER - BORN TO BUILD BETTER ENTERPRISE FRAMEWORKS AND APPS This simplest Router is done by now, when users do the request GET /user/123, the info function in user.js will be invoked. # Router Config in Detail Below is the complete definition of router, parameters can be determined depending on different scenes.应用部署
JavaScript
语言本身不需要编译的,构建过程主要是下载依赖。. 但如果使用 TypeScript 或者 Babel 支持 ES6 以上的特性,那就必须要这一步了。. 一般安装依赖会指定 NODE_ENV=production 或 npm install --production 只安装 dependencies 的依赖。. 因为 devDependencies 中的模块过大而且EGG-ONERROR
$ npm i egg-onerror # Usage Usage. egg-onerror is on by default in egg. But you still can configure its properties to fits yourscenarios.
启动自定义
启动自定义.
我们常常需要在应用启动期间进行一些初始化工作,等初始化完成后应用才可以启动成功,并开始对外提供服务。. 框架提供了统一的入口文件( app.js )进行启动过程自定义,这个文件返回一个 Boot 类,我们可以通过定义 Boot 类中的生命周期方法来定时任务
这个定时任务会在每一个 Worker 进程上每 1 分钟执行一次,将远程数据请求回来挂载到 app.cache 上。 # 任务 task 或 subscribe 同时支持 generator function 和 async function。; task 的入参为 ctx,匿名的 Context 实例,可以通过它调用 service 等。 # 定时方式 定时任务可以指定 interval 或者 cron 两种不同的前置代理模式
前置代理模式.
一般来说我们的服务都不会直接接受外部的请求,而会将服务部署在接入层之后,从而实现多台机器的负载均衡和服务的平滑发布,保证高可用。. 在这个场景下,我们无法直接获取到真实用户请求的连接,从而无法确认用户的真实IP,请求协议
单元测试
#测试运行工具. 统一使用 egg-bin 来运行测试脚本, 自动将内置的 Mocha、co-mocha、power-assert,nyc 等模块组合引入到测试脚本中, 让我们聚焦精力在编写测试代码上,而不是纠结选择那些测试周边工具和模块。. 只需要在 package.json 上配置好 scripts.test 即可。 框架内置基础对象 框架内置基础对象. 在本章,我们会初步介绍一下框架中内置的一些基础对象,包括从 Koa 继承而来的 4 个对象(Application, Context, Request, Response) 以及框架扩展的一些对象(Controller, Service,Helper, Config,
Logger),在后续的文档阅读中我们会经常遇到它们。.*
* Guide
* API
* Tutorials
* Plugins
* Release
* Languages
* English
* 中文
*
*
*
*
BORN TO BUILD
BETTER ENTERPRISE FRAMEWORKS AND APPS WITH NODE.JS & KOA 为企业级框架和应用而生Get Started GitHub
第十五届 D2 前端技术论坛·无界 >* Guide
* API
* Tutorials
* Plugins
* Release
* Languages
* English
* 中文
* Guide
* What is Egg?
* Egg and Koa
* Quick Start
* Progressive
* Migration to 2.x
* Basis Function
* Directory Structure* Built-in Objects
* Environment
* Configuration
* Middleware
* Router
* Controller
* Service
* Plugin
* Schedule
* Extend
* Custom Init
* Core
* Development
* Unit Testing
* Deployment
* Logger
* HttpClient
* Cookie and Session* Cluster and IPC
* View
* Error Handling
* Security
* i18n
* Tutorials
* MySQL
* Sequelize
* RESTful API
* Passport
* Socket.IO
* Assets
* TypeScript
* Behind a Proxy
* Advanced
* Loader
* Plugin Development* Framework
* Cluster Enhancement* View Plugin
* Style Guide
* Community
* Contributing
* Resource
* FAQ
*
* Github OrganizationExamples
*
* Community ChangelogFAQ
Issues
*
* Links Ant Design
AntV
Node.js 性能平台Enclose.IO
SOFA Stack
Latest: 2.29.4 Node.js: >= 8.0.0 Released under the MIT License站长统计
Details
1
Copyright © 2024 ArchiveBay.com. All rights reserved. Terms of Use | Privacy Policy | DMCA | 2021 | Feedback | Advertising | RSS 2.0