db: Don't warn about clearing db when using in-memory db

This commit is contained in:
Jonatan Nilsson 2022-04-19 16:37:45 +00:00
parent 33b3d98a37
commit cb5de72e13
2 changed files with 4 additions and 2 deletions

View file

@ -122,7 +122,9 @@ export default function GetDB(config, log, orgFilename = 'db.json') {
return db.read()
.then(function() {
if (!isObject(db.data)) {
if (fullpath !== 'in-memory') {
db.log.warn(`File ${fullpath} was empty or not a json object, clearing it.`)
}
db.data = {}
}
defaults(db.data, { core: { version: 1 } })

View file

@ -1,6 +1,6 @@
{
"name": "service-core",
"version": "3.0.0-beta.16",
"version": "3.0.0-beta.17",
"description": "Core boiler plate code to install node server as windows service",
"main": "index.mjs",
"scripts": {