By DigitalWitch | Cloud • DevOps • Security
This project is a backend service for a Netflix-style application. It is built using Java and Maven, with MongoDB as the database.
git clone https://github.com/digitalwitchdemo/netflix_backend.git
cd netflix_backendDelete the default .git folder to reinitialize the repository under your own account.
rm -rf .gitOpen the netflix_backend folder in your preferred IDE (e.g., VS Code).
git init
git add .
git commit -m "Initial commit"
git config user.name "your-github-username"
git config user.email "your-email@example.com"
⚠️ Important: Use your GitHub username and a Personal Access Token (PAT) as your password.
- Generate a Personal Access Token from your Git provider.
- Add your remote repository:
git remote add origin https://{username}:{personal-access-token}@gitlab.com/{your_username}/{your_repo_name}.git
git branch -M main
git push -u origin mainEnsure the following are installed on your system:
- JDK 17
- Maven 3.8+
sudo apt update -y
sudo apt install openjdk-17-jre-headless -y
sudo apt install maven -yjavac --version
java --version
mvn --versionBefore running the application, configure your MongoDB credentials:
File location:
src/main/java/resources/.env
Add the following:
MONGO_DATABASE=your_database_name
MONGO_CLUSTER=your_cluster_url
mvn clean packagejava -jar target/{your_artifact_name}.jar- The compiled
.jarfile will be located in the/targetdirectory.
- Ensure MongoDB is properly configured and accessible.
- Double-check your environment variables before running.
- Keep your Personal Access Token secure.
Good luck with your learning and development journey! 🚀
— Engr. Smart Cares