Skip to content

Node.js reference CRUD application using node-postgres and PostgresSQL

Notifications You must be signed in to change notification settings

kunalm8470/node_pg_reference_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js reference application using node-postgres and PostgresSQL

Sample barebone application using Express.js, node-postgres, dotenv, ajv, ajv-format, fast-json-patch and using PostgresSQL as persistence.


This application deals with 2 entities employees and their associated departments.

Sample structure of departments table -

id name created_at update_at
1 Human Resources 2021-07-26 18:33:32.48293 null

Sample structure of employees table -

id name code salary hire_date manager_id dept_id created_at update_at
10 Marsha Heers EM0010 61192.38 2011-03-31 3 3 2021-07-26 18:33:45.171566 null


Restful endpoints allow for -

  1. Paging /api/employees?page=1&limit=10
  2. Get single by id /api/employees/10
  3. Creating /api/employees
  4. Updating /api/employees/7
  5. Deleting /api/employees/7
  6. Patching /api/employees/7

About

Node.js reference CRUD application using node-postgres and PostgresSQL

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published