Zeus profiles!!!
Backend:
cp .env.example .env
cargo run
Frontend:
npm install
PUBLIC_BACKEND_URL="http://localhost:3000" npm run dev
Login with zauth and edit your profile
GET /api/image/{zauth_user_id}
-> gives that user's profile image
You can give any optional query parameters to change which reply you receive:
query param | value | explanation | default |
---|---|---|---|
placeholder | true / false |
return a placeholder when user has no image | true |
size | 64 / 128 / 256 / 512 |
square resolution of the image | 256 |
Note
size
will return the next largest image if requested value is not available
See env example for an example
env var | explaination |
---|---|
ZAUTH_URL |
base url of zauth |
ZAUTH_CALLBACK_PATH |
callback url of ZPI |
ZAUTH_CLIENT_ID |
zauth client id |
ZAUTH_CLIENT_SECRET |
zauth client secret |
IMAGE_PATH |
path where the profile images will be stored and retrieved |
MAGICK_PATH |
path where the magick binary is located |
DATABASE_URL |
path to the sqlite database file |
LOG_LEVEL |
log level |
FRONTEND_URL |
url to the fronted |
See env example for an example
env var | explaination |
---|---|
PUBLIC_BANKEND_URL |
url to bankend |
If you want to enable the git precommit hooks, run:
git config core.hooksPath .githooks