vue express sequelize base
1.0.0
>=8.4.0
dan npm: >=5.3.0
>=5.7.0
Untuk konfigurasi aplikasi gunakan node-config dengan file toml
buat config/local-development.toml
untuk konfigurasi pengembangan
# config/local-development.toml
env = " development "
[ db ]
username = " dbuser "
password = " dbpass "
database = " dbname "
# install dependencies
npm install
# create database table and seed with data
npm run migration
# run development server
npm run dev
# for debugging
npm run dev:inspect
Sekuel cli digunakan untuk menghasilkan file migrasi dan seeder
./node_modules/.bin/sequelize db:create
# Generate Task model
mkdir server/api/task
./node_modules/.bin/sequelize model:generate
--models-path server/api/task --name Task
--attributes name:STRING,description:TEXT,startAt:DATE,endAt:DATE,completedAt:DATE
./node_modules/.bin/sequelize db:migrate