How to Add Knex to ExpressJS Apps and Connect to a Postgres Databaseby@mandeep_m91

How to Add Knex to ExpressJS Apps and Connect to a Postgres Database

tldt arrow
Read on Terminal Reader
Read this story w/o Javascript

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.

Company Mentioned

Mention Thumbnail
featured image - How to Add Knex to ExpressJS Apps and Connect to a Postgres Database
Mandeep Singh Gulati HackerNoon profile picture

@mandeep_m91

Mandeep Singh Gulati

Learning tech by building stuff


Receive Stories from @mandeep_m91

react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!