MCPcopy Create free account

hub / github.com/FawzyMokhtar/TypeScript-in-Nodejs-Starter / functions

Functions33 in github.com/FawzyMokhtar/TypeScript-in-Nodejs-Starter

↓ 10 callersFunctionBadRequest
(response: Response, body?: AppHttpResponse)
src/app/shared/utils/http-responses.ts:18
↓ 10 callersFunctionOk
(response: Response, body?: AppHttpResponse)
src/app/shared/utils/http-responses.ts:9
↓ 10 callersMethodconnect
* Creates a new instance of @see Database and loads the database data.
src/app/shared/models/database.model.ts:21
↓ 6 callersFunctionNotFound
(response: Response, body?: AppHttpResponse)
src/app/shared/utils/http-responses.ts:63
↓ 4 callersMethoddelete
* Deletes an existing category. * @param id The id of the existing category.
src/app/categories/data/categories.data.ts:151
↓ 4 callersMethoderror
* Logs an error message and error stack to the logs `logs/errors.log` file. * @param message The error message to be logged. * @param error Th
src/app/shared/utils/logger.ts:52
↓ 2 callersMethodcreate
* Creates a new category based on the provided data-model. * @param data The data-model to create the new category.
src/app/categories/data/categories.data.ts:13
↓ 2 callersMethodfindById
* Finds the category with the given id. * @param id The id of the category.
src/app/categories/data/categories.data.ts:85
↓ 2 callersFunctiongenPaginationInfo
( page: number, pageSize: number, itemsTotalCount: number, itemsCount: number )
src/app/shared/utils/gen-pagination-info.ts:10
↓ 2 callersFunctionpaginate
(page: number, pageSize: number)
src/app/shared/utils/paginate.ts:6
↓ 2 callersMethodsearch
* Searches the categories and find the set of categories matching the provided query params. * @param name The name or part of the name of the cat
src/app/categories/data/categories.data.ts:56
↓ 2 callersMethodupdate
* Updates an existing category based on the provided data-model. * @param data The data-model to update the existing category.
src/app/categories/data/categories.data.ts:104
↓ 1 callersFunctionInternalServerError
(response: Response, error: string | Error)
src/app/shared/utils/http-responses.ts:72
↓ 1 callersFunctiongetQueryParamAsIntArray
(req: Request, param: string, separator = ',')
src/app/shared/utils/get-query-parameter.ts:14
↓ 1 callersMethodinfo
* Logs a info message to the logs `logs/logs.log` file. * @param message The info message to be logged. * @param meta An optional additional i
src/app/shared/utils/logger.ts:73
↓ 1 callersFunctionregisterRoutes
* Registers the routes for an express server. * @param app The express application that its express server will be used to register the routes.
src/app/startup/server.ts:54
↓ 1 callersFunctionsetRequestOptions
* Sets the http-request options for an express server. * @param app The express application to set its express server's request options.
src/app/startup/server.ts:31
↓ 1 callersFunctionsetupProduction
* Adds a set of middleware only if the app runs on the production machine. * @param app The express application to add the set of production middlewa
src/app/startup/server.ts:14
↓ 1 callersFunctionunhandledExceptionAndRejectionHandler
()
src/app/shared/middleware/unhandled-exception-rejection-handler.ts:8
FunctionForbidden
(response: Response)
src/app/shared/utils/http-responses.ts:44
FunctionUnAuthenticated
(response: Response)
src/app/shared/utils/http-responses.ts:26
Methodcreate
* Creates a new product based on the provided data-model. * @param data The data-model to create the new product.
src/app/products/data/products.data.ts:13
Methoddelete
* Deletes an existing product. * @param id The id of the existing product.
src/app/products/data/products.data.ts:207
FunctionerrorHandler
(error: Error, req: Request, res: Response, next: NextFunction)
src/app/shared/middleware/error-handler.ts:13
MethodfindById
* Finds the product with the given id. * @param id The id of the product.
src/app/products/data/products.data.ts:115
Methodquery
(product: Product)
src/app/products/data/products.data.ts:89
Methodquery
(category: Category)
src/app/categories/data/categories.data.ts:66
Methodsearch
* Searches the products and find the set of products matching the provided query params. * @param name The name or part of the name of the categor
src/app/products/data/products.data.ts:74
FunctionsetupServer
(app: Application)
src/app/startup/server.ts:71
FunctionstartServer
(app: Application)
src/app/startup/server.ts:89
Methodupdate
* Updates an existing product based on the provided data-model. * @param data The data-model to update the existing product.
src/app/products/data/products.data.ts:141
FunctionvalidationErrorFormatter
(expressValidatorError: ValidationError)
src/app/shared/utils/validation-error-formatter.ts:8
Methodwarn
* Logs a warning message to the logs `logs/logs.log` file. * @param message The warning message to be logged. * @param meta An optional additi
src/app/shared/utils/logger.ts:62