2. How To Launch Angular Website Locally - ayyjayy2/laynsleaf GitHub Wiki

  1. Open Node.js command prompt and navigate to location: C:\Users\janya\code\webapps\laynslife
    • Ex: C:\Users\janya>cd code/webapps/laynslife
  1. Run "code ." to launch in VS Code
  2. Open a second command prompt and navigate to layns-life folder to run the server and automatically open in browser via command : "ng serve -o"
    • I prefer one cmd for the server to stay running and another to use if adding more components, etc.
    • "ng serve" starts the server.
    • "-o" is short for "-open" which opens the website in the browser on localhost once the server compiles successfully.

image

Angular projects automatically use the port 4200, so the url would be http://localhost:4200/