Skip to content

dannielhugo/my-bank-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Bank API

This is a work made at IGTI's API201-A discipline.

It represents a bank API.

Endpoints

POST /accounts

Creates an account

Body
{
	"name": "My account",
	"balance": 100
}

GET /accounts/:id

Get an account and its balance


DEL /accounts/:id

Delete an account


PATCH /accounts/:id/deposit

Make a deposit to an account

Body
{
	"balance": 100
}

PATCH /accounts/:id/debit

Make a debit to an account

Body
{
	"balance": 100
}

Instalation and execution

  • Clone the project

  • Install packages

$ cd my-bank-api/
$ npm install
  • Execute the server
$ npm run start

Requires NodeJs@^12.x

Insomnia

Download this file and execute on Insomnia.

About

IGTI API-201A - 04/2020

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published