当前位置:网站首页>egg framework
egg framework
2022-08-05 08:12:00 【cjx177187】
what is egg.js
Rules of convention
1 app/router.js: used to configure URL routing rules;
2 app/controller/** : used to parse the user's input, and return the corresponding result after processing;
3 app/service/**: used to write business logic layer;
4 app/public/**: used to place static resources;
5 config/config.{env}.js: used to write configuration files;
6 config/plugin.js is used to configure the plugins that need to be loaded;
- egg.js is a Node.js web framework with "convention over configuration"
- Egg adheres to "convention over configuration", and develops applications according to a unified set of conventions. This approach within the team can reduce the learning cost of developers, and developers are no longer "nails" and can flow.Without an agreed-upon team, the communication cost is very high. For example, some people will divide the stack according to the directory and others will divide the function according to the directory. It is easy for developers to make mistakes if they have inconsistent cognition.But convention does not mean poor scalability. On the contrary, Egg has high scalability and can customize the framework according to the team's agreement.Using Loader allows the framework to define default configurations according to different environments, and can also override Egg's default conventions.
- The original team of Express built Koa, and Ali packaged Egg based on Koa. The naming and functions of the framework are in line with Ali's corporate culture: egg is literally translated as egg, lightweight and concise, fully functional, free and open source, withAll the characteristics of a complete life, born to incubate great Internet companies.
边栏推荐
猜你喜欢
随机推荐
Chapter 12 Bayesian Networks
JS语法使用
原型&原型链
Ethernet Principle
The color of life divine
CROS和JSONP配置
Three solutions to solve cross-domain in egg framework
iptables实现网络限制下ntp自定义端口同步时间
[转帖]嫁人一定要嫁工资至少比你高3571.4元的男士
餐饮大单品「真香」,却没有穿透周期的能力
软件系统测试和验收测试有什么联系与区别?专业软件测试方案推荐
【结构体内功修炼】结构体内存对齐(一)
P1103 书本整理
What is the connection and difference between software system testing and acceptance testing? Professional software testing solution recommendation
谷歌零碎笔记之MVCC(草稿)
在ASP控制数字及字母输入
Antdesign a-select 下拉框超出长度换行显示
php向mysql写入数据失败
Jmeter永久设置中文界面
随机码的生成