Skip to content

Commit

Permalink
DEV: Initialize database with components data when server starts
Browse files Browse the repository at this point in the history
  • Loading branch information
dwhieb committed Jun 6, 2024
1 parent 1863575 commit f818368
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions database/Database.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ import Languages from '../data/Languages.js'

export default class Database {

components = new Components
components = []

index = new Components

languages = new Languages

async initialize() {

await this.languages.load()
await this.components.load()

await this.index.load()
this.components = Array.from(this.index.values())
}

search(filterFunction) {
Expand Down

0 comments on commit f818368

Please sign in to comment.