Skip to content

Commit

Permalink
Setting up default engine
Browse files Browse the repository at this point in the history
  • Loading branch information
Jermolene committed Feb 22, 2024
1 parent e5d191e commit cfbd8ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion plugins/tiddlywiki/multiwikiserver/modules/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ exports.startup = function() {
// Create and initialise the tiddler store and upload manager
var SqlTiddlerStore = require("$:/plugins/tiddlywiki/multiwikiserver/sql-tiddler-store.js").SqlTiddlerStore,
store = new SqlTiddlerStore({
engine: "wasm",
databasePath: path.resolve($tw.boot.wikiPath,"store/database.sqlite")
}),
UploadManager = require("$:/plugins/tiddlywiki/multiwikiserver/upload-manager.js").UploadManager,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ function SqlTiddlerDatabase(options) {
$tw.utils.createFileDirectories(options.databasePath);
}
// Choose engine
this.engine = options.engine || "better"; // wasm | better
this.engine = options.engine || "wasm"; // wasm | better
// Create the database
const databasePath = options.databasePath || ":memory:";
let Database;
console.log(`Creating SQL engine ${this.engine}`)
switch(this.engine) {
case "wasm":
({ Database } = require("node-sqlite3-wasm"));
Expand Down

0 comments on commit cfbd8ab

Please sign in to comment.