This project implements a simple banking API with two endpoints:
GET /balance
: Retrieves the balance of a given account.POST /event
: Processes banking events such as deposits, withdrawals, and transfers.
- Clone the repository:
git clone https://github.com/your-username/simple-banking-api.git
- Navigate to the project directory:
cd simple-banking-api
- Install the dependencies:
npm install
- Start the API server:
npm start
The API will be accessible at http://localhost:3000
.
- Use the following endpoints to interact with the API:
GET /balance?account_id=<account_id>
: Retrieves the balance of the specified account.POST /event
: Processes a banking event. The request body should contain the event details.
To run the tests, use the following command:
npm test