mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
setup fixes
This commit is contained in:
parent
4d3fd3a0af
commit
a4b5dcff37
5 changed files with 84 additions and 102 deletions
|
@ -4,8 +4,8 @@ const dbtools = require('../../dist/utils/dbtools.js').default // eslint-disable
|
|||
const { v4: uuidv4 } = require('uuid') // eslint-disable-line
|
||||
|
||||
const dbStructPaths = [
|
||||
{ structPath: '../modules/api/usersDBStruct.json', name: 'users.db' },
|
||||
{ structPath: '../modules/api/msgsDbStruct.json', name: 'msgs.db' },
|
||||
{ structPath: '../modules/api/usersDBStruct.js', name: 'users.db' },
|
||||
{ structPath: '../modules/api/msgsDbStruct.js', name: 'msgs.db' },
|
||||
]
|
||||
|
||||
dbStructPaths.forEach((data) => {
|
||||
|
@ -14,7 +14,8 @@ dbStructPaths.forEach((data) => {
|
|||
})
|
||||
|
||||
function createDB(path, name) {
|
||||
const dbStruct = utils.ReadJSON(path)
|
||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||
const dbStruct = require(path)
|
||||
const db = dbtools.GetDB(`./${name}`)
|
||||
db.pragma('synchronous = OFF')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue