# debug
# 1. give permission if necessary
sudo chown -R vagrant:vagrant /var/log/portal
# 2. stop the node process
sudo service portal stop
# 3. (optional) check if can run
node portal.js -console -dev
# 4. node debug mode
node --inspect=0.0.0.0 portal.js -console -dev
# then open chrome chrome://inspect. Then you can see the backend code.
# (optional) 如果在inspect上看不到master和worker,应该是防火墙的问题。用下面的语句:
sudo iptables -F
# if you want to call api directly: open chrome console: VC.api.call('monitoring/getEnterpriseMapDataInternal', {enterpriseId: 1}).then(console.log)