- MacOS/Linux is required
- Docker and docker-compose are required
Start backend with docker container
- Create the dev-container:
./dev backend
- Install Python dependencies:
pipenv install
(Only first time or after git-pull) - Start Django in the dev-container:
./dev run
Create Superuser:
pipenv run python3 manage.py createsuperuser
Access By http:
- backend: http://localhost:8000/[language]/
- DRF interface: http://localhost:8000/[language]/api
Language Code:
- en-us
- zh-hans
Other commands:
- Install new pip package:
pipenv install <package-name>
- Entry the pipenv:
pipenv shell
- Create database migrations:
./dev makemigrations
- Migrate the dev-database:
./dev migrate
- Run Django test:
./dev test
- Run Coverage:
./dev coverage
- Create i18n .po file:
./dev mkmsg
- Complie i18n .po file to .mo file:
./dev comsg
For container development:
- Create the container:
./dev frontend
- Re-install PNP pakcages by Yarnpkg:
yarn install
- Start Webpack dev-server:
yarn start
For native development:
(Nodejs installed is required)
If yarnpkg is not installed: npm install -g yarn
yarn install
yarn start
Access:
Other commands:
Install new package: yarn add [-D] <package-name>@version
./dev down