feat: upgrade go 1.22 and fiber v3

This commit is contained in:
2024-02-23 07:23:55 +01:00
parent 4613e2bc60
commit e9327b6ba5
4 changed files with 42 additions and 33 deletions

View File

@@ -3,6 +3,7 @@
Bitcoin Payment Checker is a Go application that allows clients to pay for orders using Bitcoin. The application calculates the Bitcoin equivalent of the order amount, provides a wallet address for payment, and tracks the payment status.
## Demo
You can try it here on bitcoin testnet: https://btcpaychecker.urkob.com/
## Application Structure
@@ -31,7 +32,8 @@ This will start the application and listen for HTTP requests on the configured p
## Environment Variables
The application uses the following environment variables:
```
```env
PAY_CHECKER_ENV: The environment the application is running in. If set to "dev", the application will load configuration from a .env file.
DB_ADDRESS: The address of the MongoDB database.
DB_NAME: The name of the MongoDB database.
@@ -39,15 +41,16 @@ The application uses the following environment variables:
CONVERSOR_API: The API used for converting USD to Bitcoin.
RPC_HOST, RPC_AUTH, RPC_ZMQ, WALLET_ADDRESS: Configuration for the Bitcoin service.
MAIL_USER, MAIL_PASSWORD, MAIL_HOST, MAIL_PORT, MAIL_FROM: Configuration for the mail service.
```
```
### Webhook configuration
If you want some http endpoint to be called by **POST** you have to set up `WEBHOOK_URL` as environment variable with absolute URL of your endpoint. After payment is completed by client, order will be send through http `POST`.
## Dependencies
The application uses several external packages:
gofiber/fiber/v2: For building the HTTP server and handling requests.
go.mongodb.org/mongo-driver/mongo: For connecting to and interacting with MongoDB.
net/smtp: For sending emails.
gofiber/fiber/v2: For building the HTTP server and handling requests.
go.mongodb.org/mongo-driver/mongo: For connecting to and interacting with MongoDB.
net/smtp: For sending emails.