Below you will find pages that utilize the taxonomy term “express”
Posts
How to connect your ExpressJS app with Postgres using Knex
Note: I’ve created a video for this tutorial if you’d like to check that out here. Also, the supporting code for the same can be found here
Express is one of the most popular JavaScript framework for building backend APIs and Postgres is a really popular relational database. How do we connect the two?
If you look at the official documentation for Express, you’ll see the section like this:
var pgp = require('pg-promise')(/* options */) var db = pgp('postgres://username:password@host:port/database') db.