I used the apigee management api to install mongodb in my node_modules. But when I try to initialize it I always get SyntaxError: invalid object initializer.
var MongoClient = require('mongodb').MongoClient;
I used the apigee management api to install mongodb in my node_modules. But when I try to initialize it I always get SyntaxError: invalid object initializer.
var MongoClient = require('mongodb').MongoClient;
Alright, I figured it out cos aint no one looking out for me.
There were several things I did for this to work:
After thew two steps node.js recognised MongoClient. Furthermore to connect to mlabs make sure you specify the version you are using in apigee when copying the uri. Also if you have special characters in your password for ur database user you need to ASCII encode it in your uri. link here https://ascii.cl/
e.g. password! => password%21