Eaglet

最简單直接的 Koa2 的脚手架
Alternatives To Eaglet
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Socket.io58,335228,9999,6157 days ago144September 02, 2022121mitTypeScript
Realtime application framework (Node.JS server)
Strapi54,165221113a day ago281May 11, 2022402otherJavaScript
🚀 Strapi is the leading open-source headless CMS. It’s 100% JavaScript, fully customizable and developer-first.
Egg18,5471,7172,023a day ago133September 23, 2022287mitJavaScript
🥚 Born to build better enterprise frameworks and apps with Node.js & Koa
Apollo Server13,3695,3261,1532 days ago305August 26, 202241mitTypeScript
🌍  Spec-compliant and production ready JavaScript GraphQL server that lets you develop in a schema-first way. Built for Express, Connect, Hapi, Koa, and more.
Postgraphile11,95576997 days ago156May 25, 202267mitTypeScript
Execute one command (or mount one Node.js middleware) and get an instant high-performance GraphQL API for your PostgreSQL database!
Spacex Api9,825
a month ago55apache-2.0JavaScript
:rocket: Open Source REST API for SpaceX launch, rocket, core, capsule, starlink, launchpad, and landing pad data.
Art Template9,7831,5986212 years ago55November 13, 201874mitJavaScript
High performance JavaScript templating engine
Sorry6,403
2 months ago17mitCSS
在线制作`sorry 为所欲为`的gif
Fe Interview5,922
5 months ago1,151otherJavaScript
🔥🔥🔥 前端面试,独有前端面试题详解,前端面试刷题必备,1000+前端面试真题,Html、Css、JavaScript、Vue、React、Node、TypeScript、Webpack、算法、网络与安全、浏览器
Thinkjs5,2964788820 days ago238June 30, 2022131mitJavaScript
Use full ES2015+ features to develop Node.js applications, Support TypeScript.
Alternatives To Eaglet
Select To Compare


Alternative Project Comparisons
Readme

typescript,type orm,

最简单直接的 Koa2 的脚手架 - eaglet

哲学

我不想知道你的哲学,但我想立即开始并完成工作

  • 迅速开发 - 自动热重启服务 + 测试驱动开发模式 + 重置数据库(by cli)
  • 生产就绪 - 有 node 和 npm 马上可以部署,不用安装任何东西
  • 从众 - 80%人会做的设计决定(design decision)和 80%人会使用的库(library)
  • 结构简单 -  routes + MVC + 中间件(Middleware)
  • 没有魔法 - 可由 app.js 开始 , 25 分钟读懂的代码(易用,易写,易看,易学的车子结构应用和实践,用了对 node js 和 koa2 必有更多的理解)

特别之处

  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

定位

  • koa 2 入门至中级䦕发者
  • 1-5 小团队快速开发
  • 小微 IT 企业

P.S 如果你的开发团队人数大于 10 人且人人都是 koa 大神,eggjs 会是更适合你

技术堆栈

  1. Node js
  2. koa2
  3. Sequelize
  4. Mysql/SQlite

安装并运行

1. git clone [email protected]:chungchi300/eaglet.git
//更改 database
2. src/config/default.js  (default sqlite but suggest mysql in production)
3. npm i && npm run reset && npm start

访问

测试服务器

开发模式

文件修改后 nodemon立即自动重启 Node.js 服务

npm run start

在优酷上观看

测试驱动开发模式

文件修改后 Jest立即自动重新运行所有测试

npm run test

在优酷上观看

线上模式

使用 pm2 是 node 进程管理器,如果 node 进程崩溃立即自动重启进程

npm run production

在优酷上观看

配置&&部署线上

默认配置文件位于 src/config/default.js.

.env 配置会覆盖(override) 默认配置.

e.g

.env/production.json 覆盖 src/config/default.js 配置

线上 3000 port 转 80

https://stackoverflow.com/questions/16573668/best-practices-when-running-node-js-with-port-80-ubuntu-linode

谢谢

使用部分代码和概念于

17koa2

koa2-server

Popular Koa Projects
Popular Nodejs Projects
Popular Frameworks Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Js
Typescript
Node
Mysql
Sqlite
Orm
Koa2
Koa
Sequelize
Nodemon
Pm2
Sparkpost