javascriptnode.jseasyrtc

Where is the Configure function for the Express module in EasyRTC


I'm new to NodeJS and maybe I'm putting the cart before the horse here, but I am attempting to run the demo of EasyRTC using NodeJS.

The EasyRTC download page has an "easy install instructions" list of actions to perform to run EasyRTC out of the box.

I encountered a problem with the second to last step - run server.js - upon attempting to run it I receive an error claiming that the httpApp.configure() function does not exist (TypeError: undefined is not a function). Now, httpApp is defined as require("express");, so I went over every file within /node_modules/express/lib and, as the error suggests, there is no configure function defined anywhere...

So, is this just me being a complete n00b and not knowing what I'm doing? I followed all of the steps in their example - and they aren't exactly obtuse instructions.

  1. download and install node.js
  2. download EasyRTC and place it anywhere you want
  3. get EasyRTC dependencies using npm
  4. run EasyRTC's server.js

    • (I skipped over the "create folder" and "navigate to folder" steps here because... c'mon)

Am I supposed to manually create the configure function for the express module? And if so, why do they claim that it runs "out of the box"?


Solution

  • You shouldn't add that function in express, that function(configure) was removed in express 4. https://github.com/strongloop/express/wiki/Migrating-from-3.x-to-4.x

    Solution is , go to package.json file , change the json as follow, express from "*" to "3.x" , then run npm install and then run server

    "dependencies" : {
        "easyrtc"   : "*",
        "express"   : "3.x", 
        "socket.io" : "*"
    },