-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdatabase.js
More file actions
32 lines (23 loc) · 963 Bytes
/
database.js
File metadata and controls
32 lines (23 loc) · 963 Bytes
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
/*
IMPORTANT NOTICE:
MongoDB driver supports only local connection but not remote.
So you can't use it to connect to remote clusters. Current version is 0.22.0
Enable mongodb when developers will fix this issue.
*/
import { MongoClient } from "./dependencies.js"
// import { config } from "./dependencies.js";
const client = new MongoClient();
// await client.connect(Deno.env.toObject().MONGODB_CONNECTION_KEY);
// console.log("Succesfully connected to MongoDB");
// const database = client.database("deno-crypto-payments");
// const users = database.collection("users");
// export {database, users};
import {mysqlDriver} from "./dependencies.js";
const CLEARDB_MYSQL_PASSWORD = Deno.env.toObject().CLEARDB_MYSQL_PASSWORD;
const mysqlClient = await new mysqlDriver().connect({
hostname: "us-cdbr-east-03.cleardb.com",
username: "b1d981b0f3d4ff",
db: "heroku_86fd3431580f8f4",
password: CLEARDB_MYSQL_PASSWORD,
});
export {mysqlClient};