Node Objection.js tutorial with knex and Postgres | Node SQL ORM

Published: 08 February 2021
on channel: Jan Goebel
19,788
441

🔥More exclusive content: https://productioncoder.com/you-decid...
Twitter:   / _jgoebel  
Blog: https://productioncoder.com
Website: https://jangoebel.com
Full code: https://github.com/productioncoder/ob...

This screencast covers how to use Objection.js. Objection.s uses knex.js under the hood and is a SQL-friendly ORM tool for Node.js. We cover how to perform database migrations with the knex CLI tool, how to create seed data and how to connect to a Postgres database. We also build an express.js REST API to demonstrate how Objection.js can be used in Node.

00:00 introduction
02:20 project setup
06:19 creating a knexfile
09:18 Objection.js snake case mappers
11:52 creating database schema migration
19:23 executing initial database migration
23:07 creating seed data with knex CLI tool
30:47 executing seed file
31:57 creating Objection.js model classes
34:24 wiring up Objection with knex.js and Postgres
36:13 creating an express REST API powered by Objection.js
39:25 testing out REST API with Objection.js
40:00 eager loading in Objection.js
40:45 adding relation mappings
43:22 conclusion


On this page of the site you can watch the video online Node Objection.js tutorial with knex and Postgres | Node SQL ORM with a duration of hours minute second in good quality, which was uploaded by the user Jan Goebel 08 February 2021, share the link with friends and acquaintances, this video has already been watched 19,788 times on youtube and it was liked by 441 viewers. Enjoy your viewing!