1.8 KiB
1.8 KiB
VBV Lernwelt
Project setup is based on cookiecutter-django project template.
Run for development
# run tailwind cli (on project root folder!)
npm run tailwind
# run vue vite dev server
cd client && npm run dev
# reset db and run django dev server
./prepare_server.sh
Installation
See .tool-versions file for used django and node version
You have to set up at least the following environment variables:
export IT_APP_ENVIRONMENT=development
See .env_secrets/local_daniel.env for more possible environment variables.
Especially set correct values for POSTGRES_* and DATABASE_URL
Server part
Install python dependencies:
pip install -r server/requirements/requirements-dev.txt
The "prepare_server.sh" script will create the database according to POSTGRES_* environment variables.
It will also setup the tables for django and run the django development server.
# will initial`migrate` and `runserver` etc...
./prepare_server.sh
# or async server
# uvicorn config.asgi:application --host 0.0.0.0 --reload
Client part
cd client
npm install
# run dev server
npm run dev
General part
Cypress and TailwindCSS ist installed for client and server, so there is this package.json on the project root directory
# in project root directory
npm install
Deployment to CapRover
# run deploy script
./caprover_deploy.sh
IntelliJ Configuration
- In the .idea/vbv_lernwelt.iml file change the module type to "PYTHON_MODULE".
- Add django facet in "Project Structure".
- Run configuration with "Python -> server.py" to have async debugging support.
