mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-20 22:16:52 +00:00
Move the database file into a "store" directory inside the wiki folder
This commit is contained in:
parent
4b6872aa42
commit
262a730534
@ -35,7 +35,7 @@ exports.startup = function() {
|
||||
return;
|
||||
}
|
||||
// Compute the database path
|
||||
var databasePath = path.resolve($tw.boot.wikiPath,"database.sqlite");
|
||||
var databasePath = path.resolve($tw.boot.wikiPath,"store/database.sqlite");
|
||||
// Create and initialise the tiddler store
|
||||
var SqlTiddlerStore = require("$:/plugins/tiddlywiki/multiwikiserver/sql-tiddler-store.js").SqlTiddlerStore;
|
||||
$tw.sqlTiddlerStore = new SqlTiddlerStore({
|
||||
|
@ -20,6 +20,9 @@ databasePath - path to the database file (can be ":memory:" to get a temporary d
|
||||
function SqlTiddlerDatabase(options) {
|
||||
options = options || {};
|
||||
// Create the database
|
||||
if(options.databasePath) {
|
||||
$tw.utils.createFileDirectories(options.databasePath);
|
||||
}
|
||||
var databasePath = options.databasePath || ":memory:";
|
||||
this.db = new $tw.sqlite3.Database(databasePath,{verbose: undefined && console.log});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user