https://github.com/bitvora/bitvora-commerce-backend
Merchant Payment Solution powered by Bitcoin & NWC
https://github.com/bitvora/bitvora-commerce-backend
Last synced: 5 months ago
JSON representation
Merchant Payment Solution powered by Bitcoin & NWC
- Host: GitHub
- URL: https://github.com/bitvora/bitvora-commerce-backend
- Owner: bitvora
- License: mit
- Created: 2025-03-06T21:00:40.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-06-17T23:33:31.000Z (about 1 year ago)
- Last Synced: 2025-07-25T13:48:26.576Z (11 months ago)
- Language: Go
- Size: 235 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Backend Setup Instructions
This document provides instructions for setting up and running the backend service.
## Prerequisites
- Ensure you have [Docker](https://www.docker.com/get-started) and [Docker Compose](https://docs.docker.com/compose/) installed on your machine.
- Make sure you have [Go](https://golang.org/dl/) installed (version 1.16 or later).
## Setup
1. **Copy the Environment Variables File**
Before starting the application, you need to create a `.env` file with your own configuration. Copy the example file provided:
```bash
cp .env.example .env
```
Update the `.env` file with your PostgreSQL credentials and desired application port.
2. **Start the Database with Docker Compose**
Use Docker Compose to start the PostgreSQL database. Run the following command in the root of your project directory:
```bash
docker-compose up -d
```
This command will start the database service in detached mode.
3. **Build the Go Application**
After the database is up and running, build the Go application:
```bash
go build
```
4. **Run the Application**
Finally, run the application:
```bash
./your_application_name
```
Replace `your_application_name` with the name of the binary generated by the `go build` command.
5. **Access the Application**
The application should now be running on the port specified in your `.env` file (default is `2121`). You can access it via `http://localhost:2121`.
## Troubleshooting
- If you encounter issues with loading the `.env` file, ensure that the file is correctly named and located in the root of your project.
- Check the logs of the Docker containers for any errors by running:
```bash
docker-compose logs
```
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.