-
docker-compose up -d
Start the mysql database Seedocker-compose
section -
npm i
Install node dependencies -
npm start
Build the project and watch for changes. After each build, the lint and serve scripts will be run.
- Node environment variables:
src/environment.ts
- You may create a
.env
file in the project root directory to modify defaults - Shell environment variables will be passed on to node and will overwrite
variables listed in the
.env
file
- You may create a
- MySQL environment variables:
mysql/Dockerfile
- Shell environment variables will not be passed on to MySQL
-
docker-compose up -d
Start the mysql container in the background -
docker-compose stop
Stop the mysql container -
docker-compose down
Destroy the mysql container. Any changes made to the database will be lost -
docker-compose up --build -d
If any changes are made to thedocker-compose.yml
file or themysql
folder, add the--build
flag to the command when starting to incorporate the changes
npm run build
npm run serve
Tests use the database specified by the environment variable MYSQL_TEST_DB . The database will be cleared completely for each test
npm test
npm start
will start the tests in debug mode.
Attach a debugger to the default node debug port, 9229
, and continue past the initial breakpoint to run the tests.
The test will be restarted when the code changes or by typing rs
into the terminal to restart manually.