node.js API to manage customers and their address
docker-compose up -d
npm i
npx sequelize db:migrate
npx sequelize db:seed:all
docker-compose up -d
npm start
docker-compose up -d
npm test
curl --request GET \ --url http://localhost:3003/customer
curl --request GET \ --url http://localhost:3003/customer/1
curl --request POST --url http://localhost:3003/customer --header 'content-type: application/json' --data '{ "name": "Ricardo G" }'
curl --request PUT --url http://localhost:3003/customer/1 --header 'content-type: application/json' --data '{ "name": "Ricardo Georgel" }'
curl --request DELETE --url http://localhost:3003/customer/1
curl --request GET --url http://localhost:3003/customer/1/address
curl --request GET --url http://localhost:3003/customer/1/address/1
curl --request POST --url http://localhost:3003/customer/1/address --header 'content-type: application/json' --data '{ "streetAddress": "223 street", "postalCode": "12345", "country": "US" }'
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" }'
curl --request DELETE --url http://localhost:3003/customer/1/address/1