<!-- Guide of Development

Generated by {{generator}} on {{today}},
from a template provided by {{ pkg.name }}.

-->

<a id="guide-development"></a>
Development
-----

### 01 - Setup for Development

Env shell exports env variables which affect project behavior like `NODE_ENV`.

```bash
# Source env variables for local development.
$ . ./bin/env/local/local_development.sh
```

If you want to use Docker for your development, source `./bin/env/development.sh` instead.

Then, execute the setup script.

```bash
# Run setup tasks like installing modules, setting up database, loading data, etc
$ ./ci/setup.js
```


### 02 - Build Whole project

Build script invokes all build tasks for the project.

```bash
# Run build tasks like compiling, formatting, etc
$ ./ci/build.js
```

You can also execute each task separately with scripts under `./ci/misc` directory.


### 03 - Start in Debug Mode

Debug script starts server and watch files to build, and emits debug messages for development.

```bash
# Start api application on debug mode.
$ ./bin/debug/debug_api_app.js
```


```bash
# Start ui application on debug mode.
$ ./bin/debug/debug_ui_app.js
```

### 04 - Run Tests

Test scripts runs all tests in the project.

```bash
# Run all tests.
./ci/test.js
```

You can also run each test separately with scripts under `./ci/misc` directory.

```bash
# Run test for ui sites.
./ci/misc/ui_site/test.js
```


