Frontend not link properly to Backend

Thanks! The issue occurred because I was using a VPN. IT worked as soon as I turned my VPN off.

Can you please tell me why I am getting this message?


It is the exact same code as restaurant-reviews, I just changed the variables and connected to a new DB which I created. HEre is my repo:


@kevinSmith @lasjorg
Please look at this issue. Thanks in advance

This isn’t my specialty.

Also, if you’re having a different problem, you should create a new thread.

Lastly, debut it. Log out FBrainUsersDAOs.injectDB and see what it is. Trace back and figure out where it went wrong.

Thanks for the quick reply: Here’s what I got.


The code is here:

import app from "./server.js"
import mongodb from "mongodb"
import dotenv from "dotenv"
import FBrainUsersDAOs from "./dao/fBrainUsersDAO.js"
const MongoClient = mongodb.MongoClient;

const port = process.env.PORT || 8000

MongoClient.connect(process.env.FB_USERS_DB_URI, {
    maxPoolSize: 50,
    wtimeoutMS: 2500,
    useNewUrlParser: true,
  .catch((err) => {
    .then(async client => {

        await FBrainUsersDAOs.injectDB(client);
        app.listen(port, () => {
            console.log(`listening on port ${port}`);

You don’t have an injectDB method you have injection.

Thanks. I really did oversee that one. Thanks once again. I’m just trying to get it to work so I can try to populate the documents in the collection. That I haven’t figured out yet

If this is no longer about the initial tutorial project but something new I will close this thread and you can use your new thread for this project instead.