A simple scaffold application for showing database connection and management on Node.js The guide leading to this result can be found here.
pg
- PostreSQL moduleknex
- Query builderobjection
- ORM built upon Knexexpress
- API framework
It provides a simple user/message database and shows how relation can be modelled with Objection Model class. It also shows how to use eager loading to get related queries.
- Clone this repo:
git clone https://github.com/Fodark/express-knex-objection
cd express-knex-objection
npm install
to install required packages- Modify database connection according to your machine in
knexfile.js
npm start
to start the server- Point to
localhost:3000/api/users
to test if it's working