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-objectionnpm installto install required packages- Modify database connection according to your machine in
knexfile.js npm startto start the server- Point to
localhost:3000/api/usersto test if it's working