Skip to content

Simple express api for 'people'. Just a small demonstration.

Notifications You must be signed in to change notification settings

riansaunders/person-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Express API CRUD demonstration

bootstrapped with create-express-api

Routes:

  • GET /api/v1/person/
    • List of persons in the database
  • GET /api/v1/person/[id]
    • Specific person by ID
  • POST /api/v1/person
    • Add a person to the database
  • PUT /api/v1/person/[id]
    • Update a person in the database by ID
  • DELETE /api/v1/person[id]
    • Delete a person in the database by ID

Other features:

  • node-postgres
    • PostgreSQL for NodeJS
  • Joi
    • Object Schema Validation for request body

Setup

Default Environmental variables

PGHOST='localhost'
PGUSER=
PGDATABASE=
PGPASSWORD=null
PGPORT=5432
npm run migration

Development

npm run dev

About

Simple express api for 'people'. Just a small demonstration.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published