Back-end of world-of-picross web application
Python 3.12 (make sure it's the default python executable).
Open a Terminal at the project's root and execute
python -m venv .venv
Open the Terminal located at the project's root and execute
.venv\Scripts\activate
pip install -r requirements.txt
-
Install psql
-
Open the postgres REPL and execute the followings (replace
.......
by an actual password) to create the database:
CREATE ROLE picross WITH LOGIN PASSWORD '.......';
CREATE DATABASE picross OWNER picross;
- Open a Terminal at the root of the project and execute the followings to init the database:
psql -U picross -d picross -f app/database/init.sql
Copy .env.example
file, rename it .env
and modify the informations depending on your setup.
Make sure you set the DEBUG option to False when in production.
Make sure you activated the python virtual environment and execute
fastapi dev app/main.py
fastapi run app/main.py