Skip to content

carlosrodj/nodejs-with-postgres-api-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js with Postgres Example

Swagger Page of that application

Requirements

  • Node.js v8+ or Docker and Docker Compose
  • Postgres running on local instance or Docker

Running on localMachine

  • Install dependencies - sudo npm i -g typescript pm2 && npm i
  • Build typescript - npm run build
  • Run project - npm start

OR: Docker

  • docker-compose up

OR: Alternatives on pulling from Docker hub

docker run -d -p 5432:5432 --name postgres \
    --env POSTGRES_PASSWORD=mysecretpassword \
    --env POSTGRES_DB=heroes\
    postgres
docker run -p 3000:3000 \
    --link postgres:postgres \
    -e POSTGRES_HOST=postgres:mysecretpassword@postgres:5432 \
    erickwendel/nodejs-with-postgres-api-example:latest

Viewing

  • Go to swagger page - localhost:3000/documentation

About

k8s course example - node.js app with Postgres, Hapi.js and Swagger

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%