forked from quiccklabs/Labs_solutions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MongoDB Atlas with Natural Language API and Cloud Run
65 lines (41 loc) · 2.13 KB
/
MongoDB Atlas with Natural Language API and Cloud Run
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
TASK 1:-
export const environment = {
production: true,
APP_ID: 'bakery-ieppw',
GRAPHQL_URI: 'https://us-east4.gcp.realm.mongodb.com/api/client/v2.0/app/bakery-ieppw/graphql',
API_KEY: 'MSgYh1cXK3cDU8ni9PmdHAI92xh7Wdb6Buh4uKKPRBkyhvIAjhb4PvRBxX6GSkH7'
};
TASK 2:-
Name the database Bakery and the collection cakes, then click Create
Delete what is currently in the box, add the following cake document, and then press Insert:
{
"name":"Chocolate Cake",
"shortDescription":"Chocolate cake is a cake flavored with melted chocolate, cocoa powder, or sometimes both.",
"description":"Chocolate cake is made with chocolate; it can be made with other ingredients, as well. These ingredients include fudge, vanilla creme, and other sweeteners. The history of chocolate cake goes back to 1764, when Dr. James Baker discovered how to make chocolate by grinding cocoa beans between two massive circular millstones.",
"image":"https://addapinch.com/wp-content/uploads/2020/04/chocolate-cake-DSC_1768.jpg",
"ingredients":[
"flour",
"sugar",
"cocoa powder"
],
"stock": 25
}
{
"name":"Cheese Cake",
"shortDescription":"Cheesecake is a sweet dessert consisting of one or more layers. The main, and thickest, layer consists of a mixture of a soft, fresh cheese (typically cottage cheese, cream cheese or ricotta), eggs, and sugar. ",
"description":"Cheesecake is a sweet dessert consisting of one or more layers. The main, and thickest, layer consists of a mixture of a soft, fresh cheese (typically cottage cheese, cream cheese or ricotta), eggs, and sugar. If there is a bottom layer, it most often consists of a crust or base made from crushed cookies (or digestive biscuits), graham crackers, pastry, or sometimes sponge cake.[1] Cheesecake may be baked or unbaked (and is usually refrigerated).",
"image":"https://sallysbakingaddiction.com/wp-content/uploads/2018/05/perfect-cheesecake-recipe.jpg",
"ingredients":[
"flour",
"sugar",
"eggs"
],
"stock": 40
}
Add a new document to this new comments collection and add the following code
{
"cakeId": "<ID of Cake Document>",
"date": "...",
"name":"Quicklab",
"text":"Like Share & Subscribe"
}