| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This project is a 3-tier web application built using Python for the backend, with PostgreSQL as the database. The application consists of a presentation layer, a business logic layer, and a data access layer.
Before setting up the project, ensure you have the following installed on your machine:
Install the Python 3.12 virtual environment package:
sudo apt install python3.12-venv -yCreate a virtual environment:
python3 -m venv myenvActivate the virtual environment:
source myenv/bin/activateInstall required Python libraries from requirements.txt:
First, ensure pip is installed:
sudo apt install python3-pip -yThen, install the required libraries:
pip3 install -r requirements.txtTo install and set up PostgreSQL, follow these steps:
Install PostgreSQL and additional tools:
sudo apt-get install postgresql postgresql-contribStart the PostgreSQL service:
sudo systemctl start postgresqlEnable PostgreSQL to start on boot:
sudo systemctl enable postgresqlSwitch to the PostgreSQL user:
sudo -i -u postgresCreate a new PostgreSQL user:
CREATE USER root WITH PASSWORD 'root';Create a new PostgreSQL database:
CREATE DATABASE my_database;Grant all privileges on the database to the new user:
GRANT ALL PRIVILEGES ON DATABASE my_database TO root;Connect to the new database:
\c my_databaseGrant all privileges on the public schema to the user:
GRANT ALL PRIVILEGES ON SCHEMA public TO root;Grant create privileges on the database to the user:
GRANT CREATE ON DATABASE my_database TO root;Once the environment and database are set up, you can run the application with the following steps:
Ensure your virtual environment is activated:
source myenv/bin/activateRun the application:
python run.pyThe application will start, and you can access it via the specified host and port in your configuration.
This project is licensed under the MIT License - see the LICENSE file for details.
| Back | FazBrowse Home | New Git URL |