Good day everyone,
Whenever I run the command: netlify dev, 2 angular projects get loaded, one with default port 4200 and other one with the port defined in netlify.toml file. I only want to compile 1 for development. Also, when I shut down ntl dev, it shuts down the project loaded with the port in netlify.toml, but the 4200 one gets loading indefinitely and can’t use it in some time before the port closes itself or I kill it. It’s not shutting down angular properly…
netlify.toml:
[build]
command = "ng build --output-path=dist"
publish = "dist"
functions = "netlify/functions"
[dev]
command = "ng serve --open --port=4200"
port: 3000
Also, I want to run a simple nodejs script to console.log the current branch Im working on, but its crashing, here is waht I did:
[build]
command = "ng build --output-path=dist"
publish = "dist"
functions = "netlify/functions"
[dev]
command = "node print_current_environment.js && ng serve --open"
port = 3000
and print_current_environment.js file:
console.log(`CURRENT BRANCH: ${process.env.BRANCH}`);
Thanks for the help!