/db/vchess.sqlite
# socket URL file
-/public/javascripts/utils/socket_url.js
+/public/javascripts/socket_url.js
# CSS generated files
/public/stylesheets/*.map
## Installation (for developers)
0. Install git-fat https://github.com/jedbrown/git-fat
- 1. Rename public/javascripts/utils/socket\_url.js.dist into socket\_url.js
+ 1. git fat init && git fat pull
+ 2. Execute db/create.sql script (SQLite) to fill db/vchess.sqlite database
+ 3. Rename public/javascripts/socket\_url.js.dist into socket\url.js
and adjust its content.
- 2. git fat init && git fat pull
- 3. Execute db/create.sql script (SQLite) to fill db/vchess.sqlite database
4. npm i && npm start
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 url = require('url');
const sqlite3 = require('sqlite3');
-const db = new sqlite3.Database('db/vchess.sqlite');
+const db = new sqlite3.Database(__dirname + "/db/vchess.sqlite");
// Node version in Ubuntu 16.04 does not know about URL class
function getJsonFromUrl(url) {
script.
const variantArray = !{JSON.stringify(variantArray)};
script(src="/javascripts/utils/misc.js")
- script(src="/javascripts/utils/socket_url.js")
+ script(src="/javascripts/socket_url.js")
script(src="/javascripts/components/variantSummary.js")
script(src="/javascripts/index.js")
block javascripts
script(src="/javascripts/utils/misc.js")
- script(src="/javascripts/utils/socket_url.js")
script(src="/javascripts/utils/array.js")
script(src="/javascripts/utils/md5.js")
script(src="/javascripts/utils/printDiagram.js")
script(src="/javascripts/utils/ajax.js")
script(src="/javascripts/utils/datetime.js")
+ script(src="/javascripts/socket_url.js")
script(src="/javascripts/base_rules.js")
script(src="/javascripts/variants/" + variant + ".js")
script.