feat: view page layout (wip) + footer component + fixes

This commit is contained in:
Nicolas Giard
2018-08-05 23:03:46 -04:00
parent 47dcc90fb7
commit 5620419d05
11 changed files with 139 additions and 50 deletions

View File

@@ -1,4 +1,5 @@
const _ = require('lodash')
const chalk = require('chalk')
const cfgHelper = require('../helpers/config')
const fs = require('fs')
const path = require('path')
@@ -17,6 +18,8 @@ module.exports = {
dataRegex: path.join(WIKI.SERVERPATH, 'app/regex.js')
}
process.stdout.write(chalk.blue(`Loading configuration from ${confPaths.config}... `))
let appconfig = {}
let appdata = {}
@@ -28,8 +31,12 @@ module.exports = {
)
appdata = yaml.safeLoad(fs.readFileSync(confPaths.data, 'utf8'))
appdata.regex = require(confPaths.dataRegex)
} catch (ex) {
console.error(ex)
console.info(chalk.green.bold(`OK`))
} catch (err) {
console.error(chalk.red.bold(`FAILED`))
console.error(err.message)
console.error(chalk.red.bold(`>>> Unable to read configuration file! Did you create the config.yml file?`))
process.exit(1)
}

View File

@@ -1,9 +1,11 @@
const _ = require('lodash')
/* global WIKI */
module.exports = {
async init() {
WIKI.logger.info('=======================================')
WIKI.logger.info('= Wiki.js =============================')
WIKI.logger.info(`= Wiki.js ${_.padEnd(WIKI.version + ' ', 29, '=')}`)
WIKI.logger.info('=======================================')
WIKI.models = require('./db').init()
@@ -48,8 +50,9 @@ module.exports = {
*/
async postBootMaster() {
await WIKI.models.authentication.refreshStrategiesFromDisk()
await WIKI.auth.activateStrategies()
await WIKI.models.storage.refreshTargetsFromDisk()
await WIKI.auth.activateStrategies()
await WIKI.queue.start()
}
}