I have node installed on my laptop.
I have a folder that I want to use for my testing of angular:
node is installed here:
From within the nodejs directory I want to be able to start an http server like this:
C:\programfiles\nodejs> node server.js
which would start the http server and just wait, listening on some port like 5000
then, in a web browser like Chrome, I want to navigate to localhost and load an HTML file:
But the test.html file resides at this location:
I've been doing lots of reading on "express" and "connect" middleware, but I just can't seem to make it work.
I ran the following:
npm install connect -g
npm install serve-static -g
and then ran "node server.js"
var connect = require('connect');
var serveStatic = require('serve-static');
connect.createServer( serveStatic("../angularjs") ).listen( 5000);
gives this error:
TypeError: connect.createServer is not a function