stack

Home > @infiniteobjects/express-cloud-function > FunctionServer

FunctionServer class

Function server Class

Signature:

export declare class FunctionServer 

Constructors

Constructor Modifiers Description
(constructor)(config)   Constructs a new instance of the FunctionServer class

Properties

Property Modifiers Type Description
errorHandlers   ErrorRequestHandler[] Error middleware to add to the request
log readonly LoggerInstance A Logger instance
name readonly string Function name
post   RequestHandler[] Middleware to add to the request after the route handlers.
pre   RequestHandler[] Middleware to add before the route handlers. A good example is loadUser
routes   RouteConfig[] The routes for this function
server readonly Express Express server instance
staticPaths   string[] Static paths to serve (MUST BE ABSOLUTE PATHS)
version readonly string Function version

Methods

Method Modifiers Description
init()    
initSentry(dsn)   Initializes Sentry on the app
printConfig()