Giter Site home page Giter Site logo

vrify-leap-tests-03's Introduction

VRIFY - API

node.js API to manage customers and their address

Environment setup

Start the database

docker-compose up -d

Install dependencies

npm i

Execute migrations

npx sequelize db:migrate

Execute seeds

npx sequelize db:seed:all

How to run

To run in development mode

To start the database

docker-compose up -d

To start the application

npm start

To run the tests

To start the database

docker-compose up -d

To start the application

npm test

How to use

To List all customers

curl --request GET \ --url http://localhost:3003/customer

To get one customer by id

curl --request GET \ --url http://localhost:3003/customer/1

To create a new customer

curl --request POST --url http://localhost:3003/customer --header 'content-type: application/json' --data '{ "name": "Ricardo G" }'

To update one customer

curl --request PUT --url http://localhost:3003/customer/1 --header 'content-type: application/json' --data '{ "name": "Ricardo Georgel" }'

To delete one customer

curl --request DELETE --url http://localhost:3003/customer/1

To List all address of one customer

curl --request GET --url http://localhost:3003/customer/1/address

To get one address of one customer by id

curl --request GET --url http://localhost:3003/customer/1/address/1

To create a address

curl --request POST --url http://localhost:3003/customer/1/address --header 'content-type: application/json' --data '{ "streetAddress": "223 street", "postalCode": "12345", "country": "US" }'

To update one address

curl --request PUT --url http://localhost:3003/customer/1/address/1 --header 'content-type: application/json' --data '{ "streetAddress": "102 street 2", "postalCode": "9876", "country": "BR" }'

To delete one address

curl --request DELETE --url http://localhost:3003/customer/1/address/1

vrify-leap-tests-03's People

Contributors

rgeorgel avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.