Skip to content

Repository files navigation

seo-project-server

前后端分离,SEO 多页面服务端渲染模板,该模板主要用于页面结构套模板,页面路由控制以及部分接口调用(不包含交互型)。前端资源独立模板开发发布。

项目目录结构

.
├── LICENSE
├── README.md
├── README.zh-CN.md
├── app
│   ├── api 
│   │   ├── common.js 
│   │   ├── index.js                                // api 配置
│   │   └── testProject.js                          // 当个项目 api 目录
│   ├── controller                                  // 用于解析用户的输入,处理后返回相应的结果
│   │   ├── common.js
│   │   └── testProject.js
│   ├── extend
│   │   ├── context.js
│   │   └── helper.js
│   ├── init                                        // 项目启动初始化执行 js
│   │   ├── initAssets.js
│   │   └── initTImestramp.js
│   ├── middleware                                  // 中间件
│   │   └── robot.js
│   ├── public
│   ├── router                                      // 用于配置 URL 路由规则
│   │   └── testProject.js
│   ├── router.js                                   // 全局路由配置
│   ├── service                                     // 用于编写业务逻辑层
│   │   ├── common
│   │   └── testProject
│   └── view                                        // 页面模板
│       ├── default
│       └── index.nj
├── app.js
├── appveyor.yml
├── config
│   ├── config.default.js
│   ├── config.dev.js
│   ├── config.prod.js
│   └── plugin.js
├── logs
│   └── seo-project-server
│       ├── common-error.log
│       ├── egg-agent.log
│       ├── egg-schedule.log
│       ├── egg-web.log
│       └── seo-project-server-web.log
├── package-lock.json
├── package.json

QuickStart

see egg docs for more detail.

Development

$ npm i
$ npm run local
$ open http://localhost:7001/

Deploy

$ npm start
$ npm stop

npm scripts

  • Use npm run lint to check code style.
  • Use npm test to run unit test.
  • Use npm run autod to auto detect dependencies upgrade, see autod for more detail.

About

使用 egg 实现前后端分离 多项目集成方案

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages