vbv/README.md

1.7 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

# run django dev server
cd server && python manage.py runserver

Installation

See .tool-versions file for used django and node version

Server part

Run every sub command in the server directory

Create a new PostgreSQL database and role

createdb vbv_lernwelt
createuser vbv_lernwelt

Set the environment variable accordingly

export VBV_DATABASE_URL='postgres://vbv_lernwelt@localhost:5432/vbv_lernwelt'

Set VBV_DJANGO_READ_DOT_ENV_FILE=True to make the config read the example.env file (with direnv!?).

python manage.py migrate

# sync server
python manage.py runserver

# or async server
# uvicorn config.asgi:application --host 0.0.0.0 --reload

Client part

Run every command in the client directory

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

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.

Optional

Install the EnvFile Plugin

Install the tailwind css Plugin from Jetbrains