Skip to content

xKeiro/Evangelion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirements to run the website:

Install latest:

-> In PostgreSQL create a user, password and a database, remember these. (You can use pgAdmin4 for a graphical interface which comes with your installation)

-> Clone the repository.

-> pip install -r requirements.txt

In pycharm:

-> Setup your run configuration like this: run configuration

-> Set up your environment variables:

FLASK_APP=server.py
FLASK_DEBUG=1
MY_PSQL_DBNAME=<your_db_name>
MY_PSQL_USER=<your_username>
MY_PSQL_HOST=localhost
MY_PSQL_PASSWORD=<your_password>

-> Add the database

-> Run the database schema: ./data/db_schema.sql


Database setup script:

:: Setup PostgreSQL
:: Superuser: postgres
:: Remember the superuser password on setup
:: Add the PostgreSQL/bin to PATH
:: Open a command prompt in the top of the repo
:: Run:
    :: psql -U postgres
:: Enter the password
:: Run:
    :: CREATE USER test WITH PASSWORD 'test';
    :: CREATE DATABASE testdb WITH OWNER test;
    :: \i data/db_schema.sql

@echo off
set MY_PSQL_DBNAME=%1
set MY_PSQL_USER=%2
set MY_PSQL_HOST=localhost
set MY_PSQL_PASSWORD=%3

flask --app .\server.py run
.\start.bat testdb test test