onehilltech / blueprint

solid framework for building APIs and backend services
125 stars 26 forks source link

can i add sequelize modul #question #56

Open mohammad-irvan opened 2 years ago

mohammad-irvan commented 2 years ago

how to connect my blueprint app to mysql using sequelize

hilljh82 commented 2 years ago

@mohammad-irvan Please see the blueprint-sequelize module. Since sequelize is not really used in our solutions, the documentation is very limited.

But to answer your question:

  1. Install @onehilltech/blueprint-sequelize
  2. Install the mysql2 database driver
  3. Define the database configuraton in app/configs/sequelize.js.

From there, blueprint-sequelize functions in a similar manner as blueprint-mongodb. All sequelize models go under app/models directory.

We have some simple examples for using blueprint-sequelize here: https://github.com/onehilltech/blueprint/tree/master/packages/blueprint-sequelize/tests/dummy

I hope this answers your question.

mohammad-irvan commented 2 years ago

do you have youtube channel or youtube stream recommendation..i'm very interested to learn framework blueprint...because i like stand-alone application server