Configuration

Members

(static) Configuration :Configuration

Properties:
Name Type Attributes Description
rootFile string

The file that is in the root of the app, for development that should be in ./src/index.ts, this should always be '__filename'

apiPrefix string

The prefix which will be used for the api e.g. /api

debug ConfigurationDebug

The debug functions

staticFiles Array.<StaticFilesSubdomain> | StaticFiles <nullable>

Static files is used to serve static files

errorHandler ErrorHandler <nullable>

All the thrown errors and the ones from next() will be caught in the errorHandler.

notFoundHandler NotFoundHandler <nullable>

This handler is used when the route is not found.

Source:

(static) ConfigurationDebug :ConfigurationDebug

Use an empty function to disable the logger.

Properties:
Name Type Attributes Description
log function <nullable>

If undefined, the default logger will be used.

error function <nullable>

If undefined, the default logger will be used.

Source:

(static) ErrorHandler :Response.<any>

Properties:
Name Type Description
req Express.Request

The Express's Request

res Express.Response

The Express's Response

next Express.NextFunction

The Express's Next Function

error any

The error that was caught

Source:

(static) NotFoundHandler :Promise.<Response.<any>>

Properties:
Name Type Description
req Express.Request

The Express's Request

res Express.Response

The Express's Response

next Express.NextFunction

The Express's Next Function

Source:

(static) StaticFiles :StaticFiles

Properties:
Name Type Attributes Description
path string

The path that will be used to serve the files

directory Array.<string>

The root directory for the served files

subdomain string <nullable>

A subdomain is optional here

middlewares Array.<(string|function())> <nullable>

Middlewares

options serveStatic.ServeStaticOptions <nullable>

Serve Static Options (only works if 'customStaticHandler' is not changed)

disableIndexRouter boolean <nullable>

If set to false, all the requests (if is not directly to a file) are sent to index.html or to indexFileName (if set).

customStaticHandler function <nullable>

allows you to change the default static file handler e.g.

(path: string) => require('connect-gzip-static')(path, { /options here/ })
indexFileName string <nullable>

allows you to change the default index file (default: index.html)

Source:

(static) StaticFilesSubdomain :StaticFilesSubdomain

Properties:
Name Type Attributes Description
path string

The path that will be used to serve the files

directory Array.<string>

The root directory for the served files

subdomain string

The subdomain is required.

middlewares Array.<(string|function())> <nullable>

Middlewares

options serveStatic.ServeStaticOptions <nullable>

Serve Static Options

Source: