mirror of
https://github.com/spacebarchat/server.git
synced 2026-06-05 10:41:57 +00:00
⬆️ update mongodb
This commit is contained in:
@@ -1 +1,9 @@
|
||||
# server-util
|
||||
# server-util
|
||||
|
||||
add to package.json:
|
||||
|
||||
```json
|
||||
"start": "npm run build:util && npm run build && node dist/",
|
||||
"build": "tsc -b .",
|
||||
"build:util": "tsc -b ./node_modules/fosscord-server-util/"
|
||||
```
|
||||
|
||||
Generated
BIN
Binary file not shown.
+1
-1
@@ -23,7 +23,7 @@
|
||||
"jsonwebtoken": "^8.5.1",
|
||||
"lambert-db": "^1.1.7",
|
||||
"missing-native-js-functions": "^1.2.2",
|
||||
"mongodb": "^3.6.4",
|
||||
"mongodb": "^3.6.6",
|
||||
"mongoose": "^5.12.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -6,7 +6,7 @@ const uri = process.env.MONGO_URL || "mongodb://localhost:27017/fosscord?readPre
|
||||
|
||||
console.log(`[DB] connect: ${uri}`);
|
||||
|
||||
const connection = mongoose.createConnection(uri, { autoIndex: true , useNewUrlParser: true, useUnifiedTopology: true });
|
||||
const connection = mongoose.createConnection(uri, { autoIndex: true, useNewUrlParser: true, useUnifiedTopology: true });
|
||||
|
||||
export default <Connection>connection;
|
||||
|
||||
@@ -32,6 +32,7 @@ export class MongooseCache extends EventEmitter {
|
||||
}
|
||||
|
||||
init = async () => {
|
||||
// @ts-ignore
|
||||
this.stream = this.collection.watch(this.pipeline, { fullDocument: "updateLookup" });
|
||||
|
||||
this.stream.on("change", this.change);
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"include": ["src"],
|
||||
"include": ["src/**/*.ts"],
|
||||
"compilerOptions": {
|
||||
/* Visit https://aka.ms/tsconfig.json to read more about this file */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user