snake-on-koa

0.0.1-rc.10 • Public • Published

snake-on-koa

npm

QuickStart

Install

$ npm i snake-on-koa -g

Create Project

$ snake new my-project [-d mysql]
cd my-project
$ npm install
$ node run start

default: db is sqlite3

Create Controller

$ snake generate controller admin/orders [index show update delete]

Create Model

$ snake generate model order user:references title:string:index amount:decimal

Op DB

$ [NODE_ENV=development] snake db:create
$ [NODE_ENV=development] snake db:migrate
$ [NODE_ENV=development] snake db:drop

Modify Table | Migration

$ snake generate migration addColumnBirthdayAndAgeToUsers birthday:date age:integer:index
$ snake g migration renameColumnBirthdayToBirthFromUsers
$ snake g migration removeColumnBirthdayFromUsers
$ snake g migration removeIndexAgeFromUsers
$ snake g migration dropTableUsers

Readme

Keywords

none

Package Sidebar

Install

npm i snake-on-koa

Weekly Downloads

0

Version

0.0.1-rc.10

License

ISC

Unpacked Size

236 kB

Total Files

44

Last publish

Collaborators

  • wuyuedefeng