There is no big differences, if you are using MySQL or PostgreSQL database. So, I have added here only the code for Book Controller and Model. and Here are the most notable diffrences:
MySQL | PostgreSQL |
---|---|
response.json(dbResult); | response.json(dbResult.rows); |
insert into book_table (name, author, isbn) values(?,?,?) | insert into book_table (name, author, isbn) values($1,$2,$3); |