Browse Source

got to create the bogbook folder before the config

master
Ev Bogue 3 years ago
parent
commit
e8d5995219
  1. 6
      server.js

6
server.js

@ -6,6 +6,9 @@ var bogdir = path + 'bogs/'
var addir = path + 'ads/'
var confpath = path + 'config.json'
if (!fs.existsSync(homedir + '/.bogbook/')) {fs.mkdirSync(homedir + '/.bogbook/')}
if (!fs.existsSync(bogdir)){fs.mkdirSync(bogdir)}
if (fs.existsSync(confpath)) {
console.log('loading config from ' + confpath)
var config = require(confpath)
@ -23,9 +26,6 @@ if (fs.existsSync(confpath)) {
console.log(config)
if (!fs.existsSync(homedir + '/.bogbook/')) {fs.mkdirSync(homedir + '/.bogbook/')}
if (!fs.existsSync(bogdir)){fs.mkdirSync(bogdir)}
if (process.argv[2] === 'verbose') {
var VERBOSE = true
} else {

Loading…
Cancel
Save