diff --git a/README.md b/README.md index 5d43c988..2c7da69c 100644 --- a/README.md +++ b/README.md @@ -145,64 +145,127 @@ E --> H[Learning Resources] ## Quick Start +### Linux/macOS Setup + ```bash git clone https://github.com/komalharshita/devpath.git cd devpath + +python3 -m venv venv +source venv/bin/activate + +pip install -r requirements.txt + +python app.py +``` + +### Windows Setup + +```powershell +git clone https://github.com/komalharshita/devpath.git +cd devpath + python -m venv venv -source venv/bin/activate # Windows: venv\Scripts\activate +venv\Scripts\activate + +pip install -r requirements.txt + +python app.py +``` -# Shortcuts using the Makefile -make install # Installs dependencies -make run # Starts the development server +## Verify Everything Works + +Run the test suite: + +```bash +python tests/test_basic.py +``` + +Expected output: + +```bash +All tests passed ``` --- ## Troubleshooting -### Common Setup Issues +
+Virtual Environment Issues -#### Virtual environment activation not working on Windows +### Linux/macOS -Use: +If activation fails, verify Python 3 is installed: ```bash +python3 --version +``` + +### Windows PowerShell + +If you see: + +```powershell +running scripts is disabled on this system +``` + +Run: + +```powershell +Set-ExecutionPolicy -Scope Process RemoteSigned +``` + +Then activate the environment again: + +```powershell venv\Scripts\activate ``` -instead of: +
+ +
+Dependency & Flask Issues + +If dependency installation fails, first upgrade pip: ```bash -source venv/bin/activate +python -m pip install --upgrade pip ``` -#### ModuleNotFoundError - -Make sure all dependencies are installed: +Ensure Python 3.9+ is installed: ```bash -pip install -r requirements.txt +python --version ``` -#### Flask app not starting +Reinstall requirements without cache: + +```bash +pip install -r requirements.txt --no-cache-dir +``` -Verify that you are running: +If Flask is still missing: ```bash -python app.py +pip install flask ``` -from the project root directory. ---- +
-**http://127.0.0.1:5000** — that is the entire setup. +
+Port Already in Use + +If port 5000 is already in use, run the app on another port: ```bash -# Verify everything works using the Makefile shortcut -make test -# 29 passed, 0 failed out of 29 tests +flask run --port 5001 ``` +Or stop the process currently using port 5000. + +
+ --- ## Project Structure