Perdiga / boilerplate-node-api

A nice generator that creates an express application using clean architecture
MIT License
3 stars 1 forks source link

Add database framework #4

Open Perdiga opened 4 years ago

Perdiga commented 4 years ago

Research a good database framework to use; Add a sample test with unit tests and integration test; Add a step on generate-app.sh to generate the API with or without a database.

For the integration test: How to guarantee that the database will be good for the testing? Should I create a database on sqllite for testing or a container? How to version the database?

Perdiga commented 4 years ago

I am learning more about sequelize orm, and I think that is not the best option here.

For advanced query, the use of an orm is not recommended ... so I will implement the pg and other database frameworks.

This will help switch the database framework and it will be better in a clean arch

It will be easy to add an option on the generator as well

I think that I will continue using sequelize-cli to version the database

BTW nice article -> https://blog.logrocket.com/why-you-should-avoid-orms-with-examples-in-node-js-e0baab73fa5/