Global

Members

(constant) pool :Pool

Represents a pool of PostgreSQL connections.
Type:
Source:

Methods

errorHandler(err, req, res, next)

Global error handler middleware to handle and log errors.
Parameters:
Name Type Description
err Error The error object.
req object The request object.
res object The response object.
next function The next middleware function in the stack.
Source:

generateToken() → {string}

Generate a random token for user authentication.
Source:
Returns:
A randomly generated token.
Type
string

requestLogger(req, res, next)

Middleware function to log information about incoming requests and responses.
Parameters:
Name Type Description
req object The request object.
res object The response object.
next function The next middleware function in the stack.
Source:

Type Definitions

Pool

Represents a PostgreSQL connection pool.
Type:
  • Object
Properties:
Name Type Description
user string The username for connecting to the database.
host string The host where the PostgreSQL database server is located.
database string The name of the PostgreSQL database.
port number The port number to connect to the PostgreSQL database server.
Source: