Differences

This shows you the differences between two versions of the page.

Link to this comparison view

se:labs:05 [2024/11/12 13:04]
gabriel.nicolae3103 [Tasks]
se:labs:05 [2024/11/12 13:07] (current)
gabriel.nicolae3103 [Tasks]
Line 149: Line 149:
   - Look through the source code to see how Mongoose is utilised to connect to our database and create our Schema. The files you need to watch for are db/​mongoose.ts and model/​todo.ts   - Look through the source code to see how Mongoose is utilised to connect to our database and create our Schema. The files you need to watch for are db/​mongoose.ts and model/​todo.ts
   - Update the MongoDB connection string in **.env.local** with your own.   - Update the MongoDB connection string in **.env.local** with your own.
-  - Go to Atlas and create one document to test that the connection and find query works. The document needs to have a **text** (string) and a **completed** (boolean) field. MongoDB will automatically assign an _id field.+  - Go to Atlas and manually ​create one document to test that the connection and find query works. To create a document go to Clusters -> Browse Collections -> Select the collection -> Insert document. The document needs to have a **text** (string) and a **completed** (boolean) field. MongoDB will automatically assign an _id field.
   - Go to actions.ts and look at the new getItems() function, if you did everything correctly until now your ToDo list should contain one item (the document that you created earlier).   - Go to actions.ts and look at the new getItems() function, if you did everything correctly until now your ToDo list should contain one item (the document that you created earlier).
   - Look at the new createItem() function, by creating a new todo item, a new document should be inserted in our collection.   - Look at the new createItem() function, by creating a new todo item, a new document should be inserted in our collection.
se/labs/05.1731409485.txt.gz ยท Last modified: 2024/11/12 13:04 by gabriel.nicolae3103
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0