MongoDB Flashcards

1
Q

What is the general Project Folder Tree for a MERN project?

A
server/
     db
         conn.js
      routes
          record.js
      server.js
      config.env
  app/listings/
      public/
      src/
        App.js
        App.css
        index.js

The “server” directory hosts the Express.js server application and of al

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

In folder tree of a MERN what is the function of
“Db/conn.js ?

A

Exposes a global connection to the Atlas database by exporting a MongoDB client that any other module can use.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

In the MERN project “routes” accomplish what?

A

Exposes the REST API endpoints and performs their business logic against the Atlas cluster.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

server.js is the ….

A

Is the main entry point for the Express server and configuration initialization.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what is the function of config.env ?

A

Configuration file holding Atlas connection string details.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Global exposure of the server to connection with the Atlas database is by …

A

…exporting a MongoDB client that any other module can use.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Routes exposes the ….

A

…the REST API endpoints and performs their business logic against the Atlas cluster.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly