简单的 Koa2 的脚手架 safe-start-koa2

码农软件 · 软件分类 · Web框架 · 2019-03-24 18:44:30

软件介绍

简单直接的的 Koa2 的脚手架

  • 迅速开发 - 自动热重启服务 + 测试驱动开发模式 + 重置数据库(by cli)

  • 生产就绪 - 有node 和 npm 马上可以部署,不用安裝任何东西

  • 从众- 80%人会做的设计决定(design decision)和80%人会使用的库(library)

  • 结构简单 - routes + MVC + 中间件(Middleware)

  • 没有魔法 - 可由app.js 开始 , 25 分钟读懂的代码

特别之处

  1. 没有babel配置(Node 9)

  2. Nodemon 自动热重启服务

  3. 自带会员系统 (可拆开)(Passport js)

  4. 邮件服务 (Sparkpost)

  5. 对象关系映射(ORM) (Sequelize)

  6. 多个配置(/.env production.json,test.json,development.json)

  7. koa-router

技术堆栈

  1. Node js

  2. koa2

  3. Sequelize

  4. Mysql

安装并运行

1. git clone git@github.com:chungchi300/safe-start-koa2.git
//更改 database
2. src/config/default.js (Mysql)
3. npm i && npm run reset && npm start

开发模式

文件修改后自动重启 Node.js 自动热重启服务

npm run start

测试驱动开发模式

Jest

npm run test

线上模式

pm2

npm run production

本文地址:https://www.codercto.com/soft/d/2070.html

Is Parallel Programming Hard, And, If So, What Can You Do About

Is Parallel Programming Hard, And, If So, What Can You Do About

Paul E. McKenney

The purpose of this book is to help you understand how to program shared-memory parallel machines without risking your sanity.1 By describing the algorithms and designs that have worked well in the pa......一起来看看 《Is Parallel Programming Hard, And, If So, What Can You Do About 》 这本书的介绍吧!

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具