New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

generator-easy-koa

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generator-easy-koa

a generator for a koa

  • 0.1.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

generator-easy-koa NPM version Build Status Dependency Status Coverage percentage

a generator for a koa

Installation

First, install Yeoman and generator-easy-koa using npm (we assume you have pre-installed node.js).

npm install -g yo
npm install -g generator-easy-koa

Then generate your new project:

yo easy-koa   一键生成可配置项目
yo easy-koa:controller controllerName  一键生成controller

项目相关依赖

dependencies

1. koa-bodyparser
2. koa-compose
3. koa-router
4. koa-static
5. koa-swig
6. mini-logger
7. mongodb
8. mongoose
9. mysql
10. canvas-prebuilt
11. co
...

devDependencies

1. cross-env
2. gulp
3. jsdoc
4. mocha
5. should
6. supertest
7. supervisor
8. chalk
9. babel-polyfill
10.babel-preset-env

##生成项目结构

.
├── bin                                         // 启动文件
├── config                                      // 项目环境配置
│   ├── index                                   // 入口
│   ├── env                                     // 根据运行环境自动加载相应环境的变量
│   │   ├── common                              // 公共配置项
│   │   ├── development.js                      // 开发环境配置项
│   │   ├── production.js                       // 生产环境配置项                                               │   │   └── test.js                             // 测试环境配置项
├── dist                                        // 上线项目文件
├── docs                                        // jsdoc注释自动生成文档
├── src                                         // 源码目录
│   ├── controller                              // controller
│   │   ├── user                                // usercontroller
│   │   │   ├── controller.js                   // 
│   │   │   └── router.js                       // 单元controller
│   │   ├── image                               // imagecontroller
│   │   │   ├── controller.js                   // 
│   │   │   └── router.js                       // msite和shop页面的餐馆列表公共组件
│   │   └── index.js                            // 导出controller server自动注入controller
│   ├── db                                      //
│   │   └── index.js                            // 数据库连接
│   ├── log                                     // 错误日志存放
│   │   └── 2018-xx-xx-err-r.log                //
│   ├── middleware                              //中间件
│   │   ├── logger-async.js                     // log中间件
│   │   └── error.js                            // error中间件
│   ├── models                                  // models
│   │   └── user.js                             // user模型
│   ├── prototype                               // 可以继承的原型
│   │   ├── Base.js                             // 通用类方法
│   │   └── Canvas.js                           // canvas类
│   ├── views                                   // 视图层
│   │   ├── index.html                          // 
│   │   └── user.html                           // 
├── test                                        // 测试文件
│   └── index.spec.js                           
├── .babelrc   
├── Dockerfile                                    
├── .gitignore                                   
├── .gulpfile                                   
├── .index                                     
├── package.json                                    
├── package-lock.json  
└── README.md                                  

项目生成器

地址项目生成器

License

MIT © wangmeng

Keywords

FAQs

Package last updated on 16 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc