arcanajs 2.5.2 → 2.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -20,10 +20,13 @@ const server = new ArcanaJSServer({
|
|
|
20
20
|
// Example: provide a dbConnect function that returns the DB client/connection.
|
|
21
21
|
// You can connect to MySQL/Postgres/MongoDB here and return the client.
|
|
22
22
|
// dbConnect: async () => {
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
//
|
|
23
|
+
// const { MongoClient } = await import("mongodb");
|
|
24
|
+
// const url = process.env.MONGO_URL || "mongodb://localhost:27017";
|
|
25
|
+
// const dbName = process.env.MONGO_DB || "mydb";
|
|
26
|
+
// const client = new MongoClient(url);
|
|
27
|
+
// await client.connect();
|
|
28
|
+
// const db = client.db(dbName);
|
|
29
|
+
// return { client, db };
|
|
27
30
|
// },
|
|
28
31
|
// Or use one of the provided DB templates (uncomment one):
|
|
29
32
|
// dbConnect: mongoDb,
|
package/package.json
CHANGED