- setup backend (start from project root)
- run
export PORTFOLIO_DATABASE_URL=mysql://root:@127.0.0.1/
to set db url (or replace with yours) - change the
init
variable on line 35 ofpool.rs
to true (just for the first time running to initialize db) cargo run
- run
- if you ever get dependency issues just run
rustup default nightly-2022-09-24
- setup frontend
- in a seperate terminal window go to
frontend
subdirectory - run
export PORTFOLIO_API_HOST=127.0.0.1:8000
(or equivalent based on where backend api is hosted) - run
rustup default nightly-2022-09-24
npm install
and thennpm run dev
- in a seperate terminal window go to
- login as admin
- navigate to
http://[::1]:5173/admin/login
orhttp://localhost:5173/admin/login
or whatever- id should be 1 and password should be "hello"
- now you can create candidates
- some weird restrictions tho
- all candidate ids must start with valid subject prefix (101, 102, 103)
- all candidate government id's ('Rodné číslo's) must be valid theorhetical czech ids (10 digits w sum divisible by 11) i just use
736028/5163
from the wikipedia page
- navigate to