- Copy example env
cp .env.dist .env
- Populate with your own values
When you run it for the first time, it will download and build all needed images
make
then visit localhost/api
Boilerplate ships with built-in certificate, however you can create your own!
make cert
Edit your local hosts file
sudo -- sh -c "echo '127.0.0.1 app.local www.app.local' >> /etc/hosts"
Visit your application in browser https://app.local or http://app.local
yarn test
because e2e are require database connection they have to be run in container
make e2e
Run the app in debug mode:
docker-compose -f ./docker-compose.yaml -f ./docker-compose.dev.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
}
]
}