Node.js and Express Tutorial: Building and Securing RESTful APIs

After installing the mongo dependencies, creating the mongo.js file, the ads.js, and updating the index.js file, I tried running the server using “node src” and keep getting this error:

(node:14776) UnhandledPromiseRejectionWarning: TypeError: mongo.getConnectionString is not a function at startDatabase (express-ads-api\src\database\mongo.js:9:36)

Is there a workaround or an alternative to using mongo.getConnectionString?

1 Like