GoBank API
The GoBank API is a lightweight and efficient JSON API server implemented in Go. It provides endpoints for managing bank accounts and performing account-related operations. With easy-to-use RESTful endpoints, developers can quickly integrate banking functionalities into their applications.
Features
- Handle GET requests to retrieve account information.
- Handle POST requests to create new accounts.
- Handle DELETE requests to delete existing accounts.
- Handle error responses gracefully.
Setup
1. Clone the repository:
git clone https://github.com/nickemma/gobank-api.git
2. Navigate to the project directory:
cd gobank-api
3. Build the project:
go build / make build
4. Run the server:
go run ./ OR make run
By default, the server listens on localhost:5000. You can customize the listen address by specifying the LISTEN_ADDR environment variable.
API Endpoints
Get Account
GET /account/{id}
Retrieves account information based on the provided ID.
Create Account
POST /account
Creates a new account. Requires a JSON payload containing account details (e.g., first name, last name).
Delete Account
DELETE /account/{id}
Deletes an existing account based on the provided ID.
Error Handling
The API server handles errors gracefully and returns appropriate error responses with descriptive error messages in JSON format.
Dependencies
👤 Author
👤 Nicholas Emmanuel
Contributing
Contributions are welcome! Feel free to submit issues or pull requests.
License
Please be advised that our project is released under the terms of a License. Please ensure that you read and understand the terms of the MIT License before using our project.
Nicholas Emmanuel
Acknowledgments
- Creator for the inspiration for this project.
- LazyCoders For help and support throughout my development journey