mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-02-13 02:42:45 +00:00
perf: improve the perf of Anonymous GitHub
This commit is contained in:
@@ -15,7 +15,10 @@ const AnonymizedRepositorySchema = new Schema({
|
||||
lastView: Date,
|
||||
pageView: Number,
|
||||
accessToken: String,
|
||||
owner: Schema.Types.ObjectId,
|
||||
owner: {
|
||||
type: Schema.Types.ObjectId,
|
||||
index: true,
|
||||
},
|
||||
conference: String,
|
||||
source: {
|
||||
type: { type: String },
|
||||
|
||||
@@ -15,6 +15,8 @@ export let isConnected = false;
|
||||
export async function connect() {
|
||||
await mongoose.connect(MONGO_URL + "production", {
|
||||
authSource: "admin",
|
||||
appName: "Anonymous GitHub Server",
|
||||
compressors: "zlib",
|
||||
} as ConnectOptions);
|
||||
isConnected = true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user