- Python 3.8
- NodeJS 18 or higher
- Postgresql
Run Frontend
cd frontend
# Skip if node modules are already installed
npm i
# Start the app
npm start
Now app will run on http://localhost:3000
Build Frontend
cd frontend
# Skip if node modules are already installed
npm i
# Build the app
npm run build
The build package will be created under the folder build.
Before starting the app, make sure Postgresql server is up and running and set the environment variable on the terminal by running the command.
Linux/Mac :
export DATABASE_URL="postgresql://postgres:[email protected]:5432/blogData"
Windows Powershell :
$Env:DATABASE_URL = "postgresql://postgres:[email protected]:5432/blogData"
Start Backend
cd backend
# Skip if already installed python required packages
pip install -r ./requirements.txt
# Run backend
uvicorn blog.main:app --host 0.0.0.0 --port 8000 --reload
Now app will run on http://localhost:8000
In case, if terminal throws an error unvicorn is not found, try adding python -m in beginning of the command