# Install pip env manager
sudo apt install python3-venv
## python -m pip install --upgrade pip
# Create the env
python -m venv comics_env
# Activate the env
source comics_env/bin/activate
# Deactivate
deactivateImportant
For corrupted virtual env:
rm -rf comics_env
python3 -m venv comics_env
source comics_env/bin/activatepip install -r requirements.txt
# after installing new dependencies run
pip freeze > requirements.txt
## check updates
pip-review --local
## apply them
pip-review --autoNote
On termux there are several dependencies that need to be installed manually, and they can take hours to install.
pkg install c-ares
GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY=1 GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1 GRPC_PYTHON_BUILD_SYSTEM_CARES=1 CFLAGS+=" -U__ANDROID_API__ -D__ANDROID_API__=30 -include unistd.h" LDFLAGS+=" -llog" pip install grpciomake help
make start
make go-server
make test-go
make vet-go
make build-go
make test-front
make build-front
make verify
make import-postgresmake verify runs the Go test/vet/build checks plus the frontend test/build
checks. make import-postgres imports src/db/comics.db into the Postgres
target configured in the ignored Go env file.
python srcpython -m unittest discover -s testsenv PYTHONPATH=src python3 -m pytest src/*/*_test.py -vnpm run server
# Or for debug
python src/__main__.py server debugcd go_server
cp local.env .env
go run ./cmd/serverThe Go server listens on https://localhost:8081 for local development when
tls/comics.crt and tls/comics.key are present. It requires MongoDB for
auth/profile routes and a writable comics DB. SQLite is configured with
COMICS_SQLITE_PATH; Postgres is configured with COMICS_DB_DRIVER=postgres
and COMICS_POSTGRES_URL in ignored local env files.
git push heroku
heroku logs --tail # debugShould be triggered with every commit to the main branch on github repo
Tip
Check the tls folder to configure certificates for https local mode
npm install
npm start
# or
npm run start:dev # runs in https local modeRuns the app in the development mode.
Open the Vite URL printed in the terminal to view it in the browser.
The page will reload when you make changes.
You may also see any lint errors in the console.
npm testRuns the frontend test suite once. Use npm run test:watch for watch mode.\
npm run build
# GH-pages
npm run deploy && git push originBuilds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!