I am trying to go through the Angular.js Tutrorial_00 and cannot seem to work out how to get the node.js web server to run the demo app?
Has anyone done this tutorial or know how correctly use this step to get the server working?
node scripts\web-server.js
to start the web server. Open a browser windowhttp://localhost:8000/app/index.html
What happens is that I run step 1 in node.js and then it outputs "...", which I assum means it is listening.
Then when I get to step 2 I type that in the browser and get "Oops! Google Chrome could not connect to ".
You don't need a server-side engine to dynamically compose application pages because Angular does that on the client-side. If the application uses the Angular router, you must configure the server to return the application's host page ( index.html ) when asked for a file that it does not have.
Both can be combined to create isomorphic web applications. NodeJS is the cross-platform and a run-time environment for Javascript applications. AngularJS is an open-source platform for web application development which is maintained by Google. In order to use NodeJS, you need to install it into your system.
You do not need to use Node anywhere in production server to use front-end JavaScript frameworks like Angular or react etc. We can use any backend webserver technology written in any language (C# ,Java etc.)
node scripts\web-server.js
is a command line, not a piece of JavaScript.
Run it in a shell (on Windows that probably means PowerShell) while making sure you are in the right directory. Don't try to run it in a node REPL.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With