1

I'm trying to install a simple node webserver following the example in Pro AngularJS from apress.

I've installed node.js and the connect and karma modules.

I do get a warning when I installed karma via: "npm install -g karma" that says "optional dep failed, continuing" but then seems to install correctly.

I created a server.js based on the example:

var connect = require('connect');

connect.createServer(
    connect.static("../angularjs")
).listen(5000);

when I run it I get TypeError:Undefined is not a function pointing to connect.static.

royhowie
  • 11,075
  • 14
  • 50
  • 67
Nate
  • 6,384
  • 3
  • 25
  • 30

1 Answers1

1

Apparently in the latest build of connect the static middleware has been moved to it's own package.

nodejs connect cannot find static

Community
  • 1
  • 1
Nate
  • 6,384
  • 3
  • 25
  • 30