- npm install
- npm i -g sequelize-auto
- set the credentials of your db in
./app/database.js
- configure the database using phpMyAdmin or MySQL workbench or whichever db controller you are comfortable with
- Delete all the files in
./app/Models
- now run the command
sequelize-auto -h localhost -d payments -u root -x password --dialect mysql -o ./app/models
- here host=localhost, database=payments, username=root, password is understood. On running this command the database schema will be generated according to your set configurations.
- Add the models in
./app/database.js
in the models array - npm start
- If you want to change the configurations of your database, let the changes be done and run the command in step 6 again to update the structure of schema
- Lets say you added/remove a table as a part of change in step 10, follow steps 6 and 8 again
-
Notifications
You must be signed in to change notification settings - Fork 0
A boilerplate codebase for GraphQL, Nodejs and Sequelize to speed up the development game
License
cp99says/GraphQL-Node-Sequelise-WebPack-boilerplate
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A boilerplate codebase for GraphQL, Nodejs and Sequelize to speed up the development game
Topics
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published