Files
CMT/README.md
T

36 lines
773 B
Markdown

# CMT
### Starting the application
```bash
cd backend
fastapi run --reload app/main.py
```
### DB
MySQL
```sql
-- MySQL db setup
cat db_setup.sql | mysql -u root -p
-- table setup
cat db_table_setup.sql | mysql -u admin -p CMT
```
Postgresql
```bash
# Installation - Arch
sudo pacman -Syu postgresql
sudo dnf install postgresql-server postgresql-contrib # fedora
# Initialising db cluster
sudo -u postgres initdb -D /var/lib/postgres/data # Arch
sudo postgresql-setup --initdb # fedora
# enable + start service
sudo systemctl enable --now postgresql
# Creating user
sudo -u postgres createuser -P appuser
# Creating db owned by this user
sudo -u postgres createdb -O appuser db_name
# Test user + db creation
psql "postgresql://appuser:secret@localhost:5432/appdb"
```