Too Long; Didn't Read
How to Add Knex to ExpressJS Apps and Connect to a Postgres database? How do we use it to connect our ExpressJS app and how do we connect our postgres database to our Express app? Knex and Sequelize provide a very neat API for writing queries which are database agnostic and prevent issues like SQL injection attacks. These libraries provide transaction support to handle complex DB operations and streaming API to handle large volumes of data in a script. Knex creates a few extra tables which contain information about what all migrations have been applied.