Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/FawzyMokhtar/TypeScript-in-Nodejs-Starter
/ functions
Functions
33 in github.com/FawzyMokhtar/TypeScript-in-Nodejs-Starter
⨍
Functions
33
◇
Types & classes
20
↓ 10 callers
Function
BadRequest
(response: Response, body?: AppHttpResponse)
src/app/shared/utils/http-responses.ts:18
↓ 10 callers
Function
Ok
(response: Response, body?: AppHttpResponse)
src/app/shared/utils/http-responses.ts:9
↓ 10 callers
Method
connect
* Creates a new instance of @see Database and loads the database data.
src/app/shared/models/database.model.ts:21
↓ 6 callers
Function
NotFound
(response: Response, body?: AppHttpResponse)
src/app/shared/utils/http-responses.ts:63
↓ 4 callers
Method
delete
* Deletes an existing category. * @param id The id of the existing category.
src/app/categories/data/categories.data.ts:151
↓ 4 callers
Method
error
* 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 callers
Method
create
* 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 callers
Method
findById
* Finds the category with the given id. * @param id The id of the category.
src/app/categories/data/categories.data.ts:85
↓ 2 callers
Function
genPaginationInfo
( page: number, pageSize: number, itemsTotalCount: number, itemsCount: number )
src/app/shared/utils/gen-pagination-info.ts:10
↓ 2 callers
Function
paginate
(page: number, pageSize: number)
src/app/shared/utils/paginate.ts:6
↓ 2 callers
Method
search
* 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 callers
Method
update
* 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 callers
Function
InternalServerError
(response: Response, error: string | Error)
src/app/shared/utils/http-responses.ts:72
↓ 1 callers
Function
getQueryParamAsIntArray
(req: Request, param: string, separator = ',')
src/app/shared/utils/get-query-parameter.ts:14
↓ 1 callers
Method
info
* 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 callers
Function
registerRoutes
* 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 callers
Function
setRequestOptions
* 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 callers
Function
setupProduction
* 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 callers
Function
unhandledExceptionAndRejectionHandler
()
src/app/shared/middleware/unhandled-exception-rejection-handler.ts:8
Function
Forbidden
(response: Response)
src/app/shared/utils/http-responses.ts:44
Function
UnAuthenticated
(response: Response)
src/app/shared/utils/http-responses.ts:26
Method
create
* 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
Method
delete
* Deletes an existing product. * @param id The id of the existing product.
src/app/products/data/products.data.ts:207
Function
errorHandler
(error: Error, req: Request, res: Response, next: NextFunction)
src/app/shared/middleware/error-handler.ts:13
Method
findById
* Finds the product with the given id. * @param id The id of the product.
src/app/products/data/products.data.ts:115
Method
query
(product: Product)
src/app/products/data/products.data.ts:89
Method
query
(category: Category)
src/app/categories/data/categories.data.ts:66
Method
search
* 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
Function
setupServer
(app: Application)
src/app/startup/server.ts:71
Function
startServer
(app: Application)
src/app/startup/server.ts:89
Method
update
* 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
Function
validationErrorFormatter
(expressValidatorError: ValidationError)
src/app/shared/utils/validation-error-formatter.ts:8
Method
warn
* 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