Egg.js - Basics

Egg.js by the Koa.js extend from, adds multi-process support to the agreed priority configuration.

 

1, app / router.js route mapping configuration

2, app / controller directory stored in the controller, the process jumps to the associated logic

3, app / service business logic used to store

4, app / middleware middleware storage directory

5, app / public directory to store static files

6, app / extends extended framework directory, such as adding a number of variables in the method ctx

7, config configuration directory, middleware configuration items, configure the environment variables, etc.

8, test test file directory

9, you can add hooks in the boot file

Guess you like

Origin www.cnblogs.com/hellolol/p/11032232.html