projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Uniformize path to database
[vchess.git]
/
routes
/
all.js
diff --git
a/routes/all.js
b/routes/all.js
index
5ab6ae9
..
54f1611
100644
(file)
--- a/
routes/all.js
+++ b/
routes/all.js
@@
-2,7
+2,8
@@
let express = require('express');
let router = express.Router();
const createError = require('http-errors');
const sqlite3 = require('sqlite3');//.verbose();
let router = express.Router();
const createError = require('http-errors');
const sqlite3 = require('sqlite3');//.verbose();
-const db = new sqlite3.Database('db/vchess.sqlite');
+const DbPath = __dirname.replace("/routes", "/db/vchess.sqlite");
+const db = new sqlite3.Database(DbPath);
const sanitizeHtml = require('sanitize-html');
const MaxNbProblems = 20;
const sanitizeHtml = require('sanitize-html');
const MaxNbProblems = 20;