🔥More exclusive content: https://productioncoder.com/you-decide-what-we-build-next Twitter: https://twitter.com/_jgoebel Blog: https://productioncoder.com Website: https://jangoebel.com Full code: https://github.com/productioncoder/knexjs-tutorial In this video, we will cover how to connect to a database with knex.js, Postgres and express in Node. We cover how to perform migrations in knex.js, how to perform rollbacks in knex.js and how to systematically evolve a database schema. 00:00 Introduction 00:45 project setup 02:50 setting up a basic express server 05:30 generating knexfile 08:30 migrations in knex.js 11:30 setting up our first migration in knex.js 17:50 running migrations in knex.js 20:50 adding a REST endpoint that connect to the database 24:24 creating data access object with knex.js 27:35 creating knex.js service layer 28:54 building out controller layer 31:36 testing our app 34:27 adding error handling to controller 35:30 conclusion