|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
Index: config.tpl.json
|
|
|
|
|
--- config.tpl.json.orig 2018-02-13 18:08:56.000000000 +0100
|
|
|
|
|
+++ config.tpl.json 2018-02-13 18:21:59.327065000 +0100
|
|
|
|
|
+++ config.tpl.json 2018-02-13 19:56:42.685804000 +0100
|
|
|
|
|
@@ -1,7 +1,9 @@
|
|
|
|
|
{
|
|
|
|
|
- "schnack_host": "https://schnack.mysite.com",
|
|
|
|
@ -23,7 +23,7 @@ Index: config.tpl.json
|
|
|
|
|
}
|
|
|
|
|
Index: node_modules/sqlite3/package.json
|
|
|
|
|
--- node_modules/sqlite3/package.json.orig 2018-02-13 18:09:10.000000000 +0100
|
|
|
|
|
+++ node_modules/sqlite3/package.json 2018-02-13 18:20:30.820965000 +0100
|
|
|
|
|
+++ node_modules/sqlite3/package.json 2018-02-13 19:56:42.685944000 +0100
|
|
|
|
|
@@ -136,7 +136,7 @@
|
|
|
|
|
"url": "git://github.com/mapbox/node-sqlite3.git"
|
|
|
|
|
},
|
|
|
|
@ -35,7 +35,7 @@ Index: node_modules/sqlite3/package.json
|
|
|
|
|
"test": "mocha -R spec --timeout 480000"
|
|
|
|
|
Index: package.json
|
|
|
|
|
--- package.json.orig 2018-02-13 18:08:56.000000000 +0100
|
|
|
|
|
+++ package.json 2018-02-13 18:20:30.821079000 +0100
|
|
|
|
|
+++ package.json 2018-02-13 19:56:42.686055000 +0100
|
|
|
|
|
@@ -26,7 +26,7 @@
|
|
|
|
|
"scripts": {
|
|
|
|
|
"start": "node index.js",
|
|
|
|
@ -47,19 +47,37 @@ Index: package.json
|
|
|
|
|
"import": "node src/importer.js",
|
|
|
|
|
Index: src/auth.js
|
|
|
|
|
--- src/auth.js.orig 2018-02-13 18:08:56.000000000 +0100
|
|
|
|
|
+++ src/auth.js 2018-02-13 18:21:48.977992000 +0100
|
|
|
|
|
+++ src/auth.js 2018-02-13 19:56:42.686177000 +0100
|
|
|
|
|
@@ -17,7 +17,7 @@
|
|
|
|
|
saveUninitialized: false,
|
|
|
|
|
secret: config.oauth.secret,
|
|
|
|
|
cookie: { domain: `.${domain}` },
|
|
|
|
|
- store: new SQLiteStore({ db: 'sessions.db' })
|
|
|
|
|
+ store: new SQLiteStore({ db: config.sessions })
|
|
|
|
|
+ store: new SQLiteStore({ dir: "/", db: config.sessions })
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
app.use(passport.initialize());
|
|
|
|
|
Index: src/db/index.js
|
|
|
|
|
--- src/db/index.js.orig 2018-02-13 18:08:56.000000000 +0100
|
|
|
|
|
+++ src/db/index.js 2018-02-13 19:57:39.569088000 +0100
|
|
|
|
|
@@ -3,12 +3,13 @@
|
|
|
|
|
const db = require('sqlite');
|
|
|
|
|
const config = require('../../config.json');
|
|
|
|
|
const dbname = config.database || 'comments.db';
|
|
|
|
|
-const dbpath = path.resolve(__dirname, `../../${dbname}`);
|
|
|
|
|
+const dbpath = path.resolve(dbname);
|
|
|
|
|
|
|
|
|
|
// returns promise that passes db obj
|
|
|
|
|
function init() {
|
|
|
|
|
return Promise.resolve(db.open(dbpath, { Promise }))
|
|
|
|
|
.then(db => db.migrate({
|
|
|
|
|
+ migrationsPath: path.resolve(path.join(__dirname, "../../migrations"),
|
|
|
|
|
// force: process.env.NODE_ENV === 'development' ? 'last' : false
|
|
|
|
|
force: false
|
|
|
|
|
}))
|
|
|
|
|
Index: src/server.js
|
|
|
|
|
--- src/server.js.orig 2018-02-13 18:08:56.000000000 +0100
|
|
|
|
|
+++ src/server.js 2018-02-13 18:20:30.821200000 +0100
|
|
|
|
|
+++ src/server.js 2018-02-13 19:56:42.686421000 +0100
|
|
|
|
|
@@ -163,7 +163,7 @@
|
|
|
|
|
db.run('INSERT OR IGNORE INTO user (id,name,blocked,trusted,created_at) VALUES (1,"dev",0,1,datetime())');
|
|
|
|
|
}
|
|
|
|
|