mirror of
https://github.com/spacebarchat/server.git
synced 2024-09-22 10:41:34 +02:00
15 lines
295 B
TypeScript
15 lines
295 B
TypeScript
|
import mongoose from "mongoose";
|
||
|
|
||
|
async function main() {
|
||
|
const mongoConnection = await mongoose.createConnection(
|
||
|
"mongodb://localhost:27017/lambert?readPreference=secondaryPreferred",
|
||
|
{
|
||
|
useNewUrlParser: true,
|
||
|
useUnifiedTopology: false,
|
||
|
}
|
||
|
);
|
||
|
console.log("connected");
|
||
|
}
|
||
|
|
||
|
main();
|