1 let router
= require("express").Router();
2 const sqlite3
= require('sqlite3');//.verbose();
3 const DbPath
= __dirname
.replace("/routes", "/db/vchess.sqlite");
4 const db
= new sqlite3
.Database(DbPath
);
5 const selectLanguage
= require(__dirname
.replace("/routes", "/utils/language.js"));
7 router
.get('/', function(req
, res
, next
) {
8 db
.serialize(function() {
9 db
.all("SELECT * FROM Variants", (err
,variants
) => {
14 variantArray: variants
,
15 lang: selectLanguage(req
, res
),
21 module
.exports
= router
;