Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gitlherme/my-bank-api
A simple express application for IGTI API Development class.
https://github.com/gitlherme/my-bank-api
Last synced: 16 days ago
JSON representation
A simple express application for IGTI API Development class.
- Host: GitHub
- URL: https://github.com/gitlherme/my-bank-api
- Owner: gitlherme
- Created: 2021-10-05T00:53:56.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-16T22:08:19.000Z (over 3 years ago)
- Last Synced: 2024-11-12T02:51:52.933Z (3 months ago)
- Language: JavaScript
- Size: 1.2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# My Bank API
A simple express application for IGTI API Development class.
## ⚙️ Installation
- Clone this repository
- Run `npm install` to install project dependencies
- Run `npm run dev` to start a local server.## 🚩 Endpoints
```Create a new account: [POST] /accounts
Example
- Request body: { "name": "John Doe", "balance": 1000 }
- Response body: 201 CreatedGet an account: [GET] /accounts/:id
Example
- Request params: 1
- Response body: { "balance": 1000 }Make a new deposit: [PATCH] /accounts/deposit/:id
Example
- Request params: 1
- Request body: { "amount": 100 }
- Response body: { "balance": 1100 }Make a new withdraw: [PATCH] /accounts/withdraw/:id
Example
- Request params: 1
- Request body: { "amount": 100 }
- Response body: { "balance": 900 }Delete an account: [DELETE] /accounts/:id
Example
- Request params: 1
- Response body: 204 No Content
```