SimpleBankAPI is a server-side Swift web application built using the Vapor framework. It provides a simple banking API with user management, balance handling, and transaction support.
- Swift 5.3 or later
- Vapor 4
- PostgreSQL
-
Clone the repository:
git clone https://github.com/yvesoliveira23/SimpleBankAPI cd SimpleBankAPI
-
Install dependencies:
swift package update
-
Set up the database:
psql -c 'CREATE DATABASE simplebankapi;'
-
Build the project:
swift build
-
Run the project:
swift run
-
The application will be available at
http://localhost:8080
.
DATABASE_PORT
: The port for the database connection (default: 5432)DATABASE_HOSTNAME
: The hostname for the database connection (default:localhost
)DATABASE_USERNAME
: The username for the database connection (default:vapor_username
)DATABASE_PASSWORD
: The password for the database connection (default:""
)ENABLE_LEAF
: Enable Leaf templating engine (default:false
)
DATABASE_PORT=5432
DATABASE_HOSTNAME=localhost
DATABASE_USERNAME=vapor_username
DATABASE_PASSWORD=yourpassword
ENABLE_LEAF=true
Run the test suite using:
swift test
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.