- This is Subscription Service. This service is built with Golang, leveraging Goroutines and Channels for concurrency, and integrating modern technologies like Redis, Docker, and PostgreSQL for efficient performance and scalability.
Installing Golang
- Before getting started with our Subscription Service, ensure you have Go installed on your local machine. If you haven't installed it yet, you can download and install it from the official Go website here.
Installing BeepKeeper
- To use BeepKeeper with our Subscription Service, you'll need to install it on your local machine. You can download and install BeepKeeper from the official website here.
Installing Docker
- Before proceeding with our Subscription Service, make sure you have Docker installed on your local machine. If you haven't installed Docker yet, you can download and install it from the official website here.
Before running the project, ensure you have the following prerequisites:
- Running Docker: Make sure Docker is installed and running on your system. Our Docker image includes Redis, PostgreSQL, and Mailhog.
-
Navigate to the Main Directory: Go to the main directory of the project where
docker-compose.yml
andDockerfile
are located. -
Start Docker Containers:
docker-compose up -d
This command will start the Docker containers in detached mode.
-
Stop Docker Containers (Optional):
If you need to stop the Docker containers, you can use the following command:
docker-compose down
This will stop and remove the Docker containers.
To populate the database with initial data, follow these steps:
-
Copy SQL Commands: Open the
db.sql
file and copy the SQL commands. -
Run Commands in BeepKeeper Query Section: Launch BeepKeeper and navigate to the query section.
-
Paste and Execute Commands: Paste the copied SQL commands into the query section and execute them. This will create the necessary tables (
plans
,user_plans
, andusers
) in the database.
If you're on a Linux system, you can start the application using the provided Makefile. However, if you're on Windows or macOS, you'll need to convert the Makefile commands accordingly using an online tool.
To start the application, follow these steps:
-
Convert Makefile Commands (Windows/macOS):
If you're on Windows or macOS, use an online tool to convert the Makefile commands to your system's equivalent commands.
-
Run the Command:
Once you've converted the Makefile commands, open your terminal or command prompt and execute the following command:
make start
You can manage the application using the following Makefile commands:
-
To start the application: Execute the command
make start
. -
To stop the application: Execute the command
make stop
. -
To restart the application: Execute the command
make restart
.
To access the application, please navigate to the following URL in your web browser:
This address points to the local server where the application is currently running. Simply paste the URL into your browser's address bar and press Enter to access the application's interface.
- Check out the testing branch of this repository for comprehensive test cases and results for each function.