miolo 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,14 +19,14 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar
19
19
 
20
20
  function init_cacher(config) {
21
21
  var client = _redis.default.createClient(config.redis.port, config.redis.host).on('connect', function () {
22
- console.info("".concat((0, _farrapaColors.PURPLE)('REDIS'), " Connection established!"));
22
+ console.info("".concat((0, _farrapaColors.magenta)('REDIS'), " Connection established!"));
23
23
  }).on('error', function (err) {
24
24
  var msg;
25
25
 
26
26
  try {
27
- if (err instanceof _redis.default.ReplyError) msg = "".concat((0, _farrapaColors.PURPLE)('REDIS'), " ").concat((0, _farrapaColors.RED)('Error ' + err.code), " Command: ").concat(err.command, " ").concat(err.toString());else msg = "".concat((0, _farrapaColors.PURPLE)('REDIS'), " ").concat((0, _farrapaColors.RED)('Error ' + err.code), " ").concat(err.toString());
27
+ if (err instanceof _redis.default.ReplyError) msg = "".concat((0, _farrapaColors.magenta)('REDIS'), " ").concat((0, _farrapaColors.red)('Error ' + err.code), " Command: ").concat(err.command, " ").concat(err.toString());else msg = "".concat((0, _farrapaColors.magenta)('REDIS'), " ").concat((0, _farrapaColors.red)('Error ' + err.code), " ").concat(err.toString());
28
28
  } catch (e) {
29
- msg = "".concat((0, _farrapaColors.PURPLE)('REDIS'), " ").concat((0, _farrapaColors.RED)('Error '), " ").concat(e);
29
+ msg = "".concat((0, _farrapaColors.magenta)('REDIS'), " ").concat((0, _farrapaColors.red)('Error '), " ").concat(e);
30
30
  }
31
31
 
32
32
  console.error(msg);
@@ -35,7 +35,7 @@ module.exports = {
35
35
 
36
36
  },
37
37
  options: {
38
- log: 'debug'
38
+ log: 'info'
39
39
  }
40
40
  },
41
41
  routes: {// crud: {
package/lib/db/conn.js CHANGED
@@ -7,9 +7,9 @@ exports.init_db_connection = init_db_connection;
7
7
 
8
8
  var {
9
9
  getConnection
10
- } = require('calustra-conn');
10
+ } = require('calustra');
11
11
 
12
12
  function init_db_connection(config) {
13
- var conn = getConnection(config.connection, config.options);
13
+ var conn = getConnection(config);
14
14
  return conn;
15
15
  }
@@ -21,12 +21,12 @@ var {
21
21
 
22
22
  var init_logger = (config, emailer) => {
23
23
  var LEVEL_COLORS = {
24
- silly: _farrapaColors.LIGHT_CYAN,
25
- debug: _farrapaColors.LIGHT_BLUE,
26
- verbose: _farrapaColors.LIGHT_GREEN,
27
- info: _farrapaColors.YELLOW,
28
- warn: _farrapaColors.LIGHT_RED,
29
- error: _farrapaColors.RED
24
+ silly: _farrapaColors.gray,
25
+ debug: _farrapaColors.magenta,
26
+ verbose: _farrapaColors.cyan,
27
+ info: _farrapaColors.blue,
28
+ warn: _farrapaColors.yellow,
29
+ error: _farrapaColors.red
30
30
  };
31
31
  var myFormat = printf(info => {
32
32
  var _config$format;
@@ -89,7 +89,7 @@ var init_logger = (config, emailer) => {
89
89
 
90
90
  var logger = createLogger({
91
91
  level: (config === null || config === void 0 ? void 0 : config.level) || 'silly',
92
- format: combine(format.errors({
92
+ format: combine(errors({
93
93
  stack: true
94
94
  }), timestamp(), myFormat),
95
95
  transports: _log_transports
@@ -28,9 +28,9 @@ function init_sys_check_and_log(logger) {
28
28
  var perc = Math.round(used * 100 / total, 2);
29
29
 
30
30
  if (perc > 80) {
31
- logger.error("[SERVER][".concat((0, _farrapaColors.CYAN)('SysCheck'), "] RAM ").concat((0, _farrapaColors.YELLOW)(used), " MB used of ").concat((0, _farrapaColors.GREEN)(total), " MB (").concat((0, _farrapaColors.YELLOW)(perc), " %)"));
31
+ logger.error("[SERVER][".concat((0, _farrapaColors.cyan)('SysCheck'), "] RAM ").concat((0, _farrapaColors.yellow)(used), " MB used of ").concat((0, _farrapaColors.green)(total), " MB (").concat((0, _farrapaColors.yellow)(perc), " %)"));
32
32
  } else {
33
- logger.info("[SERVER][".concat((0, _farrapaColors.CYAN)('SysCheck'), "] RAM ").concat((0, _farrapaColors.YELLOW)(used), " MB used of ").concat((0, _farrapaColors.GREEN)(total), " MB (").concat((0, _farrapaColors.YELLOW)(perc), " %)"));
33
+ logger.info("[SERVER][".concat((0, _farrapaColors.cyan)('SysCheck'), "] RAM ").concat((0, _farrapaColors.yellow)(used), " MB used of ").concat((0, _farrapaColors.green)(total), " MB (").concat((0, _farrapaColors.yellow)(perc), " %)"));
34
34
  }
35
35
 
36
36
  diskspace.check('/', function (err, result) {
@@ -39,9 +39,9 @@ function init_sys_check_and_log(logger) {
39
39
  var free = Math.round(toGB(result.free), 2);
40
40
 
41
41
  if (free < 1) {
42
- logger.error("[SERVER][".concat((0, _farrapaColors.CYAN)('SysCheck'), "] DISK ").concat((0, _farrapaColors.YELLOW)(used), " GB used of ").concat((0, _farrapaColors.GREEN)(total), " MB (").concat((0, _farrapaColors.YELLOW)(free), " GB free)"));
42
+ logger.error("[SERVER][".concat((0, _farrapaColors.cyan)('SysCheck'), "] DISK ").concat((0, _farrapaColors.yellow)(used), " GB used of ").concat((0, _farrapaColors.green)(total), " MB (").concat((0, _farrapaColors.yellow)(free), " GB free)"));
43
43
  } else {
44
- logger.info("[SERVER][".concat((0, _farrapaColors.CYAN)('SysCheck'), "] DISK ").concat((0, _farrapaColors.YELLOW)(used), " GB used of ").concat((0, _farrapaColors.GREEN)(total), " MB (").concat((0, _farrapaColors.YELLOW)(free), " GB free)"));
44
+ logger.info("[SERVER][".concat((0, _farrapaColors.cyan)('SysCheck'), "] DISK ").concat((0, _farrapaColors.yellow)(used), " GB used of ").concat((0, _farrapaColors.green)(total), " MB (").concat((0, _farrapaColors.yellow)(free), " GB free)"));
45
45
  }
46
46
  });
47
47
  }
@@ -34,15 +34,15 @@ function init_socket(logger) {
34
34
  });
35
35
  io.on('connection', function (ctx, _data) {
36
36
  var i = getInfo(ctx);
37
- logger.debug("".concat((0, _farrapaColors.BLUE)('SOCKET'), " Connection from ").concat(i.ip, " ").concat(i.id));
37
+ logger.debug("".concat((0, _farrapaColors.blue)('SOCKET'), " Connection from ").concat(i.ip, " ").concat(i.id));
38
38
  });
39
39
  io.on('disconnect', function (ctx, data) {
40
40
  var i = getInfo(ctx);
41
- logger.debug("".concat((0, _farrapaColors.BLUE)('SOCKET'), " Disconnected ").concat(i.ip, " ").concat(i.id, " => ").concat(data));
41
+ logger.debug("".concat((0, _farrapaColors.blue)('SOCKET'), " Disconnected ").concat(i.ip, " ").concat(i.id, " => ").concat(data));
42
42
  });
43
43
  io.on('error', function (ctx, data) {
44
44
  var i = getInfo(ctx);
45
- logger.error("".concat((0, _farrapaColors.BLUE)('SOCKET'), " Error on ").concat(i.ip, " ").concat(i.id, " => ").concat(data));
45
+ logger.error("".concat((0, _farrapaColors.blue)('SOCKET'), " Error on ").concat(i.ip, " ").concat(i.id, " => ").concat(data));
46
46
  });
47
47
  return io;
48
48
  }
@@ -43,11 +43,11 @@ function init_request_middleware(app) {
43
43
 
44
44
  var ip = ctx.headers["x-real-ip"] || '127.0.0.1';
45
45
  ctx.request.ip = ip;
46
- logger.info("req begin ".concat(ctx.requestId, " - ip ").concat(ip, " - ").concat((0, _farrapaColors.CYAN)(ctx.request.method), " ").concat((0, _farrapaColors.CYAN)(ctx.request.url), " ").concat(ctx.request.body != undefined ? JSON.stringify(ctx.request.body) : ''));
46
+ logger.info("req begin ".concat(ctx.requestId, " - ip ").concat(ip, " - ").concat((0, _farrapaColors.cyan)(ctx.request.method), " ").concat((0, _farrapaColors.cyan)(ctx.request.url), " ").concat(ctx.request.body != undefined ? JSON.stringify(ctx.request.body) : ''));
47
47
  yield next();
48
48
  var user = (ctx === null || ctx === void 0 ? void 0 : (_ctx$state = ctx.state) === null || _ctx$state === void 0 ? void 0 : _ctx$state.user) || {};
49
49
  var elapsed = parseFloat((_perf_hooks.performance.now() - started) / 1000.0).toFixed(2);
50
- var tcolor = elapsed < 1.0 ? _farrapaColors.GREEN : elapsed < 2.0 ? _farrapaColors.YELLOW : _farrapaColors.RED;
50
+ var tcolor = elapsed < 1.0 ? _farrapaColors.green : elapsed < 2.0 ? _farrapaColors.yellow : _farrapaColors.red;
51
51
  logger.info("req end ".concat(ctx.requestId, " ").concat(user ? " - uid ".concat(user.id) : '', " => ").concat(tcolor("DONE in ".concat(elapsed, " seconds"))));
52
52
  });
53
53
  return _request_middleware.apply(this, arguments);
@@ -28,7 +28,7 @@ function init_route_catch_js_error(app, route) {
28
28
  agent
29
29
  } = ctx.request.body;
30
30
  var logger = ctx.miolo.logger;
31
- var msg = "".concat((0, _farrapaColors.RED)('[JS Error]'), " on ").concat((0, _farrapaColors.BLUE)(path), ": ").concat(error.msg) + "".concat((0, _farrapaColors.RED)('[JS Error]'), " File => ").concat(error.file) + "".concat((0, _farrapaColors.RED)('[JS Error]'), " Line => ").concat(error.line) + "".concat((0, _farrapaColors.RED)('[JS Error]'), " Col => ").concat(error.col) + "".concat((0, _farrapaColors.RED)('[JS Error]'), " Error => ").concat(JSON.stringify(error.error)) + "".concat((0, _farrapaColors.RED)('[JS Error]'), " Agent => ").concat(agent);
31
+ var msg = "".concat((0, _farrapaColors.red)('[JS Error]'), " on ").concat((0, _farrapaColors.blue)(path), ": ").concat(error.msg) + "".concat((0, _farrapaColors.red)('[JS Error]'), " File => ").concat(error.file) + "".concat((0, _farrapaColors.red)('[JS Error]'), " Line => ").concat(error.line) + "".concat((0, _farrapaColors.red)('[JS Error]'), " Col => ").concat(error.col) + "".concat((0, _farrapaColors.red)('[JS Error]'), " Error => ").concat(JSON.stringify(error.error)) + "".concat((0, _farrapaColors.red)('[JS Error]'), " Agent => ").concat(agent);
32
32
  logger.error(msg);
33
33
  ctx.body = {
34
34
  result: 1
@@ -37,7 +37,7 @@ function init_route_html_render(app, html) {
37
37
  var method = ctx.request.method;
38
38
  var url = ctx.request.url;
39
39
  var what = html != undefined ? 'provided html' : 'fallback page';
40
- logger.info("".concat(reqid, " - ").concat(ip, " : ").concat((0, _farrapaColors.CYAN)(method), " ").concat((0, _farrapaColors.CYAN)(url), " => Rendering ").concat(what));
40
+ logger.info("".concat(reqid, " - ").concat(ip, " : ").concat((0, _farrapaColors.cyan)(method), " ").concat((0, _farrapaColors.cyan)(url), " => Rendering ").concat(what));
41
41
  ctx.body = html || indexHTML;
42
42
  });
43
43
  return _html_render.apply(this, arguments);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "miolo",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "miolo",
5
5
  "main": "lib/index.js",
6
6
  "author": "Afialapis <info@afialapis.com>",
@@ -15,11 +15,11 @@
15
15
  "babel-plugin-module-resolver": "^4.1.0",
16
16
  "basic-auth": "^2.0.1",
17
17
  "cron": "^1.8.2",
18
- "calustra-conn": "0.0.12",
19
- "calustra-router": "0.0.12",
18
+ "calustra": "0.0.16",
19
+ "calustra-router": "0.0.16",
20
20
  "diskspace": "^2.0.0",
21
21
  "eslint": "^8.7.0",
22
- "farrapa-colors": "^1.0.0",
22
+ "farrapa-colors": "^1.0.2",
23
23
  "koa": "^2.13.4",
24
24
  "koa-better-body": "^3.3.9",
25
25
  "koa-bodyparser": "^4.3.0",
@@ -1,22 +1,22 @@
1
1
  import redis from 'redis'
2
2
  import { promisify } from 'util'
3
- import { RED, PURPLE } from 'farrapa-colors'
3
+ import { red, magenta } from 'farrapa-colors'
4
4
 
5
5
  function init_cacher(config) {
6
6
 
7
7
  const client = redis.createClient(config.redis.port, config.redis.host)
8
8
  .on('connect', function () {
9
- console.info(`${PURPLE('REDIS')} Connection established!`)
9
+ console.info(`${magenta('REDIS')} Connection established!`)
10
10
  })
11
11
  .on('error', function (err) {
12
12
  let msg
13
13
  try {
14
14
  if (err instanceof redis.ReplyError)
15
- msg = `${PURPLE('REDIS')} ${RED('Error ' + err.code)} Command: ${err.command} ${err.toString()}`
15
+ msg = `${magenta('REDIS')} ${red('Error ' + err.code)} Command: ${err.command} ${err.toString()}`
16
16
  else
17
- msg = `${PURPLE('REDIS')} ${RED('Error ' + err.code)} ${err.toString()}`
17
+ msg = `${magenta('REDIS')} ${red('Error ' + err.code)} ${err.toString()}`
18
18
  } catch(e) {
19
- msg = `${PURPLE('REDIS')} ${RED('Error ')} ${e}`
19
+ msg = `${magenta('REDIS')} ${red('Error ')} ${e}`
20
20
  }
21
21
  console.error(msg)
22
22
  })
@@ -30,7 +30,7 @@ module.exports= {
30
30
  idleTimeoutMillis: 10000, // The maximum time, in milliseconds, that a connection can be idle before being released. Use with combination of evict for proper working, for more details read https://github.com/coopernurse/node-pool/issues/178#issuecomment-327110870,
31
31
  },
32
32
  options: {
33
- log: 'debug'
33
+ log: 'info'
34
34
  },
35
35
  },
36
36
  routes: {
package/src/db/conn.js CHANGED
@@ -1,8 +1,8 @@
1
- const {getConnection} = require('calustra-conn')
1
+ const {getConnection} = require('calustra')
2
2
 
3
3
  function init_db_connection(config) {
4
4
 
5
- const conn= getConnection(config.connection, config.options)
5
+ const conn= getConnection(config)
6
6
 
7
7
  return conn
8
8
  }
@@ -1,4 +1,4 @@
1
- import { LIGHT_CYAN, LIGHT_BLUE, LIGHT_GREEN, YELLOW, LIGHT_RED, RED } from 'farrapa-colors'
1
+ import { red, blue, cyan, magenta, yellow, gray } from 'farrapa-colors'
2
2
  /* https://github.com/winstonjs/winston/issues/925 */
3
3
  /* https://github.com/winstonjs/winston/issues/287 */
4
4
  const { createLogger, format, transports } = require('winston')
@@ -7,12 +7,12 @@ const { combine, timestamp, _label, printf, errors } = format
7
7
 
8
8
  const init_logger = (config, emailer) => {
9
9
  const LEVEL_COLORS= {
10
- silly : LIGHT_CYAN,
11
- debug : LIGHT_BLUE,
12
- verbose: LIGHT_GREEN,
13
- info : YELLOW,
14
- warn : LIGHT_RED,
15
- error : RED
10
+ silly : gray,
11
+ debug : magenta,
12
+ verbose: cyan,
13
+ info : blue,
14
+ warn : yellow,
15
+ error : red
16
16
  }
17
17
 
18
18
  const myFormat = printf(info => {
@@ -81,7 +81,7 @@ const init_logger = (config, emailer) => {
81
81
  const logger = createLogger({
82
82
  level: config?.level || 'silly',
83
83
  format: combine(
84
- format.errors({ stack: true }),
84
+ errors({ stack: true }),
85
85
  timestamp(),
86
86
  myFormat
87
87
  ),
@@ -1,6 +1,6 @@
1
1
  const os = require('os')
2
2
  const diskspace = require('diskspace')
3
- import { CYAN, GREEN, YELLOW } from 'farrapa-colors'
3
+ import { cyan, green, yellow } from 'farrapa-colors'
4
4
 
5
5
  function init_sys_check_and_log(logger) {
6
6
  function toMB(bytes) {
@@ -22,9 +22,9 @@ function init_sys_check_and_log(logger) {
22
22
  const perc= Math.round( (used*100)/total, 2)
23
23
 
24
24
  if (perc>80) {
25
- logger.error(`[SERVER][${CYAN('SysCheck')}] RAM ${YELLOW(used)} MB used of ${GREEN(total)} MB (${YELLOW(perc)} %)`)
25
+ logger.error(`[SERVER][${cyan('SysCheck')}] RAM ${yellow(used)} MB used of ${green(total)} MB (${yellow(perc)} %)`)
26
26
  } else {
27
- logger.info(`[SERVER][${CYAN('SysCheck')}] RAM ${YELLOW(used)} MB used of ${GREEN(total)} MB (${YELLOW(perc)} %)`)
27
+ logger.info(`[SERVER][${cyan('SysCheck')}] RAM ${yellow(used)} MB used of ${green(total)} MB (${yellow(perc)} %)`)
28
28
  }
29
29
 
30
30
 
@@ -35,9 +35,9 @@ function init_sys_check_and_log(logger) {
35
35
  const free = Math.round(toGB(result.free), 2)
36
36
 
37
37
  if (free<1) {
38
- logger.error(`[SERVER][${CYAN('SysCheck')}] DISK ${YELLOW(used)} GB used of ${GREEN(total)} MB (${YELLOW(free)} GB free)`)
38
+ logger.error(`[SERVER][${cyan('SysCheck')}] DISK ${yellow(used)} GB used of ${green(total)} MB (${yellow(free)} GB free)`)
39
39
  } else {
40
- logger.info(`[SERVER][${CYAN('SysCheck')}] DISK ${YELLOW(used)} GB used of ${GREEN(total)} MB (${YELLOW(free)} GB free)`)
40
+ logger.info(`[SERVER][${cyan('SysCheck')}] DISK ${yellow(used)} GB used of ${green(total)} MB (${yellow(free)} GB free)`)
41
41
  }
42
42
  });
43
43
  }
@@ -1,5 +1,5 @@
1
1
  import IO from 'koa-socket-2'
2
- import { BLUE } from 'farrapa-colors'
2
+ import { blue } from 'farrapa-colors'
3
3
 
4
4
  function init_socket(logger) {
5
5
 
@@ -18,17 +18,17 @@ function init_socket(logger) {
18
18
 
19
19
  io.on('connection', function (ctx, _data) {
20
20
  const i= getInfo(ctx)
21
- logger.debug(`${BLUE('SOCKET')} Connection from ${i.ip} ${i.id}`)
21
+ logger.debug(`${blue('SOCKET')} Connection from ${i.ip} ${i.id}`)
22
22
  })
23
23
 
24
24
  io.on('disconnect', function (ctx, data) {
25
25
  const i = getInfo(ctx)
26
- logger.debug(`${BLUE('SOCKET')} Disconnected ${i.ip} ${i.id} => ${data}`)
26
+ logger.debug(`${blue('SOCKET')} Disconnected ${i.ip} ${i.id} => ${data}`)
27
27
  })
28
28
 
29
29
  io.on('error', function (ctx, data) {
30
30
  const i = getInfo(ctx)
31
- logger.error(`${BLUE('SOCKET')} Error on ${i.ip} ${i.id} => ${data}`)
31
+ logger.error(`${blue('SOCKET')} Error on ${i.ip} ${i.id} => ${data}`)
32
32
  })
33
33
 
34
34
  return io
@@ -1,5 +1,5 @@
1
1
  import { performance } from 'perf_hooks'
2
- import { CYAN, GREEN, YELLOW, RED } from 'farrapa-colors'
2
+ import { cyan, green, yellow, red } from 'farrapa-colors'
3
3
 
4
4
  let REQUEST_COUNTER= 1
5
5
 
@@ -24,7 +24,7 @@ function init_request_middleware(app) {
24
24
 
25
25
  ctx.request.ip = ip
26
26
 
27
- logger.info(`req begin ${ctx.requestId} - ip ${ip} - ${CYAN(ctx.request.method)} ${CYAN(ctx.request.url)} ${ctx.request.body!=undefined ? JSON.stringify(ctx.request.body) : ''}`)
27
+ logger.info(`req begin ${ctx.requestId} - ip ${ip} - ${cyan(ctx.request.method)} ${cyan(ctx.request.url)} ${ctx.request.body!=undefined ? JSON.stringify(ctx.request.body) : ''}`)
28
28
 
29
29
  await next()
30
30
 
@@ -34,10 +34,10 @@ function init_request_middleware(app) {
34
34
  const elapsed = parseFloat( (performance.now() - started) / 1000.0 ).toFixed(2)
35
35
 
36
36
  const tcolor= elapsed < 1.0
37
- ? GREEN
37
+ ? green
38
38
  : elapsed < 2.0
39
- ? YELLOW
40
- : RED
39
+ ? yellow
40
+ : red
41
41
 
42
42
  logger.info(`req end ${ctx.requestId} ${user ? ` - uid ${user.id}` : ''} => ${tcolor(`DONE in ${elapsed} seconds`)}`)
43
43
  }
@@ -1,4 +1,4 @@
1
- import { BLUE, RED } from 'farrapa-colors'
1
+ import { blue, red } from 'farrapa-colors'
2
2
  import Router from '@koa/router'
3
3
 
4
4
  function init_route_catch_js_error(app, route) {
@@ -8,12 +8,12 @@ function init_route_catch_js_error(app, route) {
8
8
  const logger = ctx.miolo.logger
9
9
 
10
10
  const msg=
11
- `${RED('[JS Error]')} on ${BLUE(path)}: ${error.msg}` +
12
- `${RED('[JS Error]')} File => ${error.file}` +
13
- `${RED('[JS Error]')} Line => ${error.line}` +
14
- `${RED('[JS Error]')} Col => ${error.col}` +
15
- `${RED('[JS Error]')} Error => ${JSON.stringify(error.error)}` +
16
- `${RED('[JS Error]')} Agent => ${agent}`
11
+ `${red('[JS Error]')} on ${blue(path)}: ${error.msg}` +
12
+ `${red('[JS Error]')} File => ${error.file}` +
13
+ `${red('[JS Error]')} Line => ${error.line}` +
14
+ `${red('[JS Error]')} Col => ${error.col}` +
15
+ `${red('[JS Error]')} Error => ${JSON.stringify(error.error)}` +
16
+ `${red('[JS Error]')} Agent => ${agent}`
17
17
 
18
18
  logger.error(msg)
19
19
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  import fs from 'fs'
3
3
  import { resolve } from 'path'
4
- import { CYAN } from 'farrapa-colors'
4
+ import { cyan } from 'farrapa-colors'
5
5
  import Router from '@koa/router'
6
6
 
7
7
  const indexHTMLPath= resolve(__dirname, 'fallback_index.html')
@@ -20,7 +20,7 @@ function init_route_html_render(app, html) {
20
20
  const what = html!=undefined
21
21
  ? 'provided html'
22
22
  : 'fallback page'
23
- logger.info(`${reqid} - ${ip} : ${CYAN(method)} ${CYAN(url)} => Rendering ${what}`)
23
+ logger.info(`${reqid} - ${ip} : ${cyan(method)} ${cyan(url)} => Rendering ${what}`)
24
24
 
25
25
  ctx.body = html || indexHTML
26
26
  }