You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example to demonstrate the possibility to connect Serverless Functions to MongoDB.
3
+
Example to demonstrate the possibility of connecting Serverless Functions to MongoDB.
4
4
5
5
For this example, [Scaleway Console](https://console.scaleway.com/) will be used for deployment.
6
6
7
7
> [!WARNING]
8
-
> This is a basic sample that does not use certificate for authentication, not recommended for production.
8
+
> This is a basic sample that does not use a certificate for authentication, not recommended for production.
9
9
10
10
## Requirements
11
11
12
-
-Mongo DB created [documentation](https://www.scaleway.com/en/docs/managed-mongodb-databases/quickstart/#how-to-create-a-database-instance)
12
+
-MongoDB created [documentation](https://www.scaleway.com/en/docs/managed-mongodb-databases/quickstart/#how-to-create-a-database-instance)
13
13
14
14
## Step 1 - Mongo
15
15
16
-
After Mongo DB creation, in the console find the public endpoint of the database, it should look like: `<scw_database_id>.mgdb.<scw_region>.scw.cloud`
16
+
After MongoDB creation, in the console, find the public endpoint of the database; it should look like: `<scw_database_id>.mgdb.<scw_region>.scw.cloud`
17
17
18
18
Once you get the endpoint, keep it somewhere for later use.
19
19
20
20
## Step 2 - Function Creation
21
21
22
-
Before creating a the Function, we need to package it into a zip file.
22
+
Before creating the Function, we need to package it into a zip file.
23
23
24
24
> [!TIP]
25
25
> It's recommended to do it via command line tools, so the following example shows how to zip this current folder:
@@ -30,17 +30,17 @@ Before creating a the Function, we need to package it into a zip file.
30
30
>```
31
31
32
32
- Create a Serverless Function namespace. [Documentation](https://www.scaleway.com/en/docs/serverless-functions/how-to/create-manage-delete-functions-namespace/#creating-a-serverless-functions-namespace)
33
-
- In the created namespace, create a Serverless Function
34
-
- Select the latest Go runtime
35
-
- Upload the previously created `go-mongo.zip`
36
-
- Ensure the handler is `Handle`
33
+
- In the created namespace, create a Serverless Function.
0 commit comments