For our purposes we will be using simplest Express.js project with PostgreSQL database container in Docker.

1. Starting new project

If you already have your own project you can skip this part and pass to section “2. Knex.js”

What to expect from this part?

  • running local instance of PostgreSQL Docker container

Image for post

  • users’ and ‘archive_users’ database tables with fake data

Image for post

  • Express.js application, that will allow us to fetch required data from the database using Knex.js.

Image for post

Let’s begin…

#docker #knex #postgres #postgresql #knexjs

Knex.Js. Beginner’s Guide with Examples
10.05 GEEK