- TODO
- download dart sdk, install to a path --
/path/to/dart-sdk
- export env in your shell
export dart_sdk_home=/path/to/dart-sdk
- install Intellij Dart plugin
- open
pubspec.yaml
and clickGet Dependencies
- go to
kaif-deploy
, read README. Install vagrant and provision an VM - you may need to retry provision if failed
cd kaif-deploy
vagrant up
ansible-playbook -dev site.yml # if failed on postfix, just retry again
- after vagrant complete, run
play_vagrant_recreate_db.sh
to initialize DB schema
- go to
kaif-web
, execute gradle tomcat, and pub serve
cd kaif-web
../gradlew pubServe
../gradlew bootRun
-
bootRun
will start a development embed tomcat, you can visit http://localhost:5980 -
pubServe
will start pub server in 15980 port, which used by dev server -
you can use gradle in Intellij to run
bootRun
andpubServe
. ForpubServe
you need to specify vm arguments:-Ddart_sdk_home=/absolute/path/to/dart-sdk
- import code style in tools/idea_settings.jar (scheme select
lambda_idea
) - in run configurations, change
Defaults
JUnit
working directory to$MODULE_DIR$
- append
?kaif-locale=en
can force change locale in bootRun server, default value is zh_TW
-
use quite old version of lessc because lesscss-gradle-plugin
-
Intellij may prompt you use .less filewatcher, we don't use it, just dismiss.
- build kaif-web.war then deploy to vagrant
./war.sh
cd kaif-deploy
./play_vagrant_deploy_war.sh
- edit your /etc/hosts
192.168.59.59 localdev.kaif.io
- go visit https://localdev.kaif.io/ to check nginx is ready
- you need secret files to operate production servers. see kaif-deploy/README.md for detail