Home Reference Source Repository

Function

Static Public Summary
public

createLogger(pretty: Boolean, verbose: Boolean, winston: winston): void

Function to create a global logger object based on the properties of the logger function.

public

createTemp(): void

Create the temporary directory.

public

doSetup(app: Express, pretty: Boolean, verbose: Boolean): void

Setup the Express service.

public

Execute a command from within the root folder.

public

resetLog(): void

Reset the default log file.

public

setupRoutes(app: ExpressJS): void

Setup ExpressJS routing.

Static Public

public createLogger(pretty: Boolean, verbose: Boolean, winston: winston): void source

import {createLogger} from 'beerio-api/src/config/logger.js'

Function to create a global logger object based on the properties of the logger function.

Params:

NameTypeAttributeDescription
pretty Boolean
  • optional
  • nullable: true

Pretty mode for output with colors.

verbose Boolean
  • optional
  • nullable: true

Debug mode for no output.

winston winston
  • optional
  • default: _createWinston()
  • nullable: true

The Winston object to create a global logger.

Return:

void

public createTemp(): void source

import {createTemp} from 'beerio-api/src/utils.js'

Create the temporary directory.

Return:

void

public doSetup(app: Express, pretty: Boolean, verbose: Boolean): void source

import doSetup from 'beerio-api/src/config/setup.js'

Setup the Express service.

Params:

NameTypeAttributeDescription
app Express

The ExpresssJS instance.

pretty Boolean
  • optional
  • nullable: true

Pretty output with Winston logging.

verbose Boolean
  • optional
  • nullable: true

Debug mode for no output.

Return:

void

public executeCommand(cmd: String): Promise source

import {executeCommand} from 'beerio-api/src/utils.js'

Execute a command from within the root folder.

Params:

NameTypeAttributeDescription
cmd String

The command to execute.

Return:

Promise

The output of the command.

public resetLog(): void source

import {resetLog} from 'beerio-api/src/utils.js'

Reset the default log file.

Return:

void

public setupRoutes(app: ExpressJS): void source

import setupRoutes from 'beerio-api/src/config/routes.js'

Setup ExpressJS routing.

Params:

NameTypeAttributeDescription
app ExpressJS

The ExpresssJS application.

Return:

void