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;
Solved! Go to Solution.
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
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
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |