I'm not getting odata-server working on my machine (Windows 8.1, nodejs 0.10.30, mongo 2.4.8). Also tried clean Ubuntu install, same problem. Repro scenario:
This gives the following output:
Should be empty: []
Test data upload successful. 100 items inserted.
Starting NewsReader OData server.
C:\Projects\odata\node_modules\odata-server\node_modules\mongodb\lib\mongodb\connection\base.js:245
throw message;
^
TypeError: Object function createServer() {
function app(req, res, next){ app.handle(req, res, next); }
merge(app, proto);
merge(app, EventEmitter.prototype);
app.route = '/';
app.stack = [];
return app;
} has no method 'basicAuth'
at C:\Projects\odata\node_modules\odata-server\newsreader.js:14:25
at defer.<anonymous> (C:\Projects\odata\node_modules\odata-server\newsreader\context.js:123:13)
at Object.cbWrapper.success (C:\Projects\odata\node_modules\odata-server\node_modules\jaydata\lib\JayDataModules\qDeferred.js:25:38)
at NewsContext.$data.Class.define._applyTransaction (C:\Projects\odata\node_modules\odata-server\node_modules\jaydata\lib\Types\EntityContext.js:224:16)
at readyFn (C:\Projects\odata\node_modules\odata-server\node_modules\jaydata\lib\Types\EntityContext.js:1430:17)
at NewsContext.$data.Class.define._postProcessSavedItems (C:\Projects\odata\node_modules\odata-server\node_modules\jaydata\lib\Types\EntityContext.js:1473:14)
at Object.innerCallback.success (C:\Projects\odata\node_modules\odata-server\node_modules\jaydata\lib\Types\EntityContext.js:1154:29)
at Object.self._saveCollections.success (C:\Projects\odata\node_modules\odata-server\node_modules\jaydata\lib\Types\StorageProviders\mongoDB\mongoDBStorageProvider.js:653:38)
at readyFn (C:\Projects\odata\node_modules\odata-server\node_modules\jaydata\lib\Types\StorageProviders\mongoDB\mongoDBStorageProvider.js:566:22)
at esFn (C:\Projects\odata\node_modules\odata-server\node_modules\jaydata\lib\Types\StorageProviders\mongoDB\mongoDBStorageProvider.js:590:19)
what am I missing?
Connect no longer ships with basicAuth (along with the rest of the middleware) and has been moved to an external middleware repo.
This can be found here.