Skip to content

rogrs/padiola

Repository files navigation

Simple Node with Express + PostgreSQL Server using JSONB

An easy way to get started with a Express server with PostgreSQL with Node.js.

##Deploy Heroku

Deploy

Features

  • Body-parser
  • Environment Variables
  • Express
  • REST API
  • PostgreSQL using Data Type JsonB
  • Sequelizejs - Ver

Test

  • Mocha — Test Framework
  • Chai  — Test Framework
  • Should  — Biblioteca para extender os testes
  • Request — Para realizar as chamadas na API

Requirements

Installation

  • git clone https://github.com/rogrs/padiola.git
  • cd padiola
  • npm install
  • npm start
  • optional: include .env in your .gitignore

GET Routes

Beyond GET Routes

CURL

  • Create a message with:
    • curl -X POST -H "Content-Type:application/json" http://localhost:4200/api/v1/behaviour -d '{"document":"{name:'T-003',ammout:100,member:'amanda'"}'
  • Delete a message with:
    • curl -X DELETE -H "Content-Type:application/json" http://localhost:4200/api/v1/behaviour/1

Postman