# Default Configurations

# name

Name of your project/application.

# env

Equivalent to NODE_ENV, holds your current environment.

Options: development, production, staging or your custom environment

# Debug

# debug.enabled

If true, debugging is enabled.

# debug.requests

Note: Requires xpresser version >=0.26.8

This object holds the configuration for debugging requests.

// Default Data
    enabled: true,
    colored: "mute",
    showAll: false,
    show: {
        time: false,
        statusCode: true,
        statusMessage: false
    ignore: [],
    ignoreFn: () => false

# debug.requests.enabled

Default: true

Enable/Disable debugging requests.

# debug.requests.colored

Default: "mute"

true - Colored output.
false - No colored output.
mute - Dimmed output.

# debug.requests.show

This object holds the config for selecting what to show in the debug log.

// Default Data
    time: false,  // Include/Exclude time in the debug log.
    statusCode: true, // Include/Exclude statusCode in the debug log.
    statusMessage: false // Include/Exclude statusMessage in the debug log.

# debug.requests.showAll

Default: false

Show all the request log data. When set to true, the show object is ignored.

# debug.requests.ignore

Default: []

An array of number|string|regexp method/urls that will be ignored.

ignore: [
    // Ignore 204 status codes.
    // Ignore all requests that `startsWith` or `includes` "/static/"
    // Ignore png and jpg files using regexp.

# debug.requests.ignoreFn

A function that will be called for each request. If the function returns true, the request will be ignored.

Note: This function will be called after the ignore array.

ignoreFn: (http) => {
    // Ignore requests with status code `204` 
    // OR Ignore all requests that `startsWith` or `includes` "/static/"
    return http.res.statusCode === 204 || http.req.url.startsWith("/static/")

# Server

# server.port

Default: 2000

Server port.

# server.protocol

Default: 'http'

Server protocol needed for url generator helpers.

# server.domain

Default: 'localhost'

Server domain.

# server.root

Default: '/'

Server root needed for url generator helpers. If your files are in a sub-folder you can indicate here also.

# server.router

Xpresser router config

    pathCase: 'snake' | 'kebab' // default: 'snake'

# server.router.pathCase

Default: 'snake'

Router shorthand path case. Can either be snake or kebab.

$.router.path("/user", (r) => {

// `snake` will be converted to:

// `kebab` will be converted to: