- Copy example env
cp .env.dist .env
- Populate with your own values
- Copy users-dictionary
cp users-dictionary.json.example users-dictionary.json
- Populate with data
When you run it for the first time, it will download and build all needed images
make
Boilerplate ships with built-in certificate, however you can create your own!
make cert
- Open hosts file in your editor. (eg.
sudo vim /etc/hosts
) - add your DOMAIN variable eg.
127.0.0.1 app.local www.app.local
- Save changes
Visit your application in browser https://app.local or http://app.local
Run the app in debug mode:
docker-compose -f ./docker-compose.yaml -f ./with-debug.yaml up --build -d
make debug
-
In your IDE go to
Run
->Edit Configurations...
-
+
(Add New Configuration) ->Attach to Node.js/Chrome
- Name: name it as you want, like
debug
- Host: localhost
- Port: 9229
- Attach to: Chrome or Node.js > 6.3
- Reconnect automatically
OK
- Name: name it as you want, like
-
Start debugging!
- Install Docker Extension for vscode: https://code.visualstudio.com/docs/azure/docker
- Press CMD(Ctrl)+Shift+P(Command Palette) and find “Debug: Open launch.json”:
- Then choose Docker: Node.js
- Paste this configuration:
{
"version": "0.2.0",
"configurations": [
{
"name": "App: Attach Docker to Node",
"type": "node",
"request": "attach",
"remoteRoot": "/home/node/app",
"port": 9229,
"address": "localhost",
"localRoot": "${workspaceFolder}",
"protocol": "inspector",
"restart": true
}
]
}
# development
yarn start
# watch mode
yarn start:dev
# production mode
yarn start:prod
# unit tests
yarn test
# e2e tests
yarn test:e2e
# test coverage
yarn test:cov