1 Star 0 Fork 0

bigfish / Koa-Server

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Koa-Server

介绍

  1. 使用 Koa2 + TypeScript搭建项目
  2. 通过TypeScript装饰器封装路由层,并实现功能完备的MVC架构
  3. 既能使用 pug 作为网页模板引擎,也能够使用原生 html 网页
  4. 使用 puppeteer-core 连接本地浏览器实现无头浏览器爬虫等功能
  5. 使用 mockjs 方式实现服务器产生模拟数据来供给特定需求使用
  6. 通过连接池的方式,连接MySQL数据库,增强稳定性
  7. 配置了PM2集群,进程守护等功能,来保证测试和生产的稳定

目录结构

├── /build     		   # js打包文件
├── /docs              # 项目相关文档存放
├── /src               # 源码目录
│ ├── /common          # 公共代码
│ ├── /config          # 应用配置
│ ├── /controller      # 控制层
│ ├── /interfaces      # 全局接口
│ ├── /middleware      # 应用中间件
│ ├── /model           # 数据层
│ ├── /plugins         # 插件
│ ├── /router          # 路由
│ ├── /service         # 服务层
│ ├── /typings         # 类型
│ ├── /utils           # 工具库
│ └── app.ts           # 主程序
├── static             # 静态资源
├── .eslintignore      # eslint忽视
├── .eslintrc.js       # eslint配置
├── .gitignore         # git忽视
├── .prettierrc.js     # 格式化配置
├── favicon.ico        # 项目图标
├── LICENSE            # 执照
├── package.json       # 依赖包
├── package-lock.json  # 依赖包版本锁定
├── pm2.json           # pm2配置
├── Readme_en.md       # 项目英文文档
├── Readme_zh.md       # 项目中文文档
└── tsconfig.json      # ts编译配置

使用说明

  1. 安装依赖:

    npm i
  2. 启动:

    npm start
  3. pm2守护:

    npm run prd

参与贡献

  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request
MIT License Copyright (c) 2020 fangminglee Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

基于Koa和TypeScript的服务端程序 展开 收起
TypeScript
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
TypeScript
1
https://gitee.com/bigfishi/Koa-Server.git
git@gitee.com:bigfishi/Koa-Server.git
bigfishi
Koa-Server
Koa-Server
master

搜索帮助