X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=routes%2Fall.js;h=54f1611d49b255be03482b4291a80fbf98b9e572;hp=5ab6ae90f67b61936c02fe57a058786b18d8b9f2;hb=a48ee8b80ae4902f1e70629a608396fe3ff046d0;hpb=b41d5704896ba56527bbf7c007ede94dc69680c3 diff --git a/routes/all.js b/routes/all.js index 5ab6ae90..54f1611d 100644 --- 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(); -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;