Commit | Line | Data |
---|---|---|
8d7e2786 | 1 | const sqlite3 = require('sqlite3'); |
1ad88021 | 2 | const path = require('path'); |
badeb466 BA |
3 | const params = require("../config/parameters") |
4 | ||
0234201f | 5 | if (params.env == "development") sqlite3.verbose(); |
badeb466 | 6 | |
1ad88021 BA |
7 | const DbPath = __dirname.replace( |
8 | `${path.sep}utils`, | |
9 | `${path.sep}db${path.sep}vchess.sqlite`); | |
8d7e2786 BA |
10 | const db = new sqlite3.Database(DbPath); |
11 | ||
12 | module.exports = db; |