egg-sequelize-ts-auto

1.0.2 • Public • Published

Sequelize-Auto For Eggjs

Base on Sequelize-Auto

Support typescript option

Install

npm install -g egg-sequelize-ts-auto  or  npm install egg-sequelize-ts-auto

you also have to install @types/sequelize in you eggjs project

npm i @types/sequelize

typescript example

In you eggjs project root
./node_modules/.bin/egg-sequelize-ts-auto -d database -h localhost -p 3306 -u root -x 1234 --dialect mysql -o app/model -z -g model
install global npm
  egg-sequelize-ts-auto -d database -h localhost -p 3306 -u root -x 1234 --dialect mysql -o app/model -z -g model

-z for typescript , -g model load model at ctx.model

you will get some ts file in app/model

Now you can go on with typescript

Package Sidebar

Install

npm i egg-sequelize-ts-auto

Weekly Downloads

5

Version

1.0.2

License

MIT

Unpacked Size

69.5 kB

Total Files

23

Last publish

Collaborators

  • liuhuanhui