2024-12-05 04:46:55 +01:00
|
|
|
db = db.getSiblingDB(process.env.GUESTBOOKY_DB_NAME);
|
2024-10-05 00:27:04 +02:00
|
|
|
|
|
|
|
db.createUser(
|
|
|
|
{
|
2024-12-05 04:46:55 +01:00
|
|
|
user: process.env.GUESTBOOKY_USER,
|
|
|
|
pwd: process.env.GUESTBOOKY_PASSWORD,
|
2024-10-05 00:27:04 +02:00
|
|
|
roles: [
|
|
|
|
{
|
|
|
|
role: "readWrite",
|
2024-12-05 04:46:55 +01:00
|
|
|
db: process.env.GUESTBOOKY_DB_NAME
|
2024-10-05 00:27:04 +02:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
db.createCollection("GuestbookMessages");
|
|
|
|
|
|
|
|
db.GuestbookMessages.createIndex({ "Timestamp": 1 });
|