An application to search through artist, style or genre of releases for selected record label.
- Environment Configuration To run the application, you need to set up two environment configuration files: .env.backend and .env.db. These files contain the necessary variables for the backend service and the database connection, respectively.
Create a file named .env.backend in the root of your project with the following configuration:
CORS_ORIGIN=http://localhost:3000 # The allowed origin for CORS requests
POSTGRES_USER=youruser # Your PostgreSQL username
POSTGRES_PASSWORD=yourpassword # Your PostgreSQL password
POSTGRES_DB=yourdb # The name of your PostgreSQL database
POSTGRES_HOST=db # The host where PostgreSQL is running (usually `db` in Docker setup)
POSTGRES_PORT=5432 # The port for PostgreSQL (default is 5432)
DISCOGS_APP_NAME=PROVIDE_APP_NAME # The name of your application (used in User-Agent)
DISCOGS_KEY=API_KEY # Your Discogs API key
DISCOGS_SECRET=API_SECRET # Your Discogs API secret
SELECTED_LABEL=5 # Label id to fetch from Discogs APICreate a separate file named .env.db in the root of your project with the following configuration:
POSTGRES_USER=youruser # Your PostgreSQL username
POSTGRES_PASSWORD=yourpassword # Your PostgreSQL password
POSTGRES_DB=yourdb # The name of your PostgreSQL database
POSTGRES_HOST=db # The host where PostgreSQL is running (usually `db` in Docker setup)
POSTGRES_PORT=5432 # The port for PostgreSQL (default is 5432)- Run docker-compose Run the following command to build and start the services:
docker-compose up --buildThis will start your backend service and Postgres database. The React frontend will be served through Nginx.
- Access the Application:
Open your browser and go to http://localhost:3000 to view the application
Navigate to your Go backend directory:
cd backendRun the following command to execute tests:
go test ./...Navigate to your Go backend directory:
cd tone_addiction_frontendRun the following command to execute tests:
npm test