Update Guide to Version 2
This guide will take you step by step through the upgrade to version 2. If something is missing or incorrect, feel free to submit an issue or a PR on Github.
Node versions | TS min version |
---|---|
10.x, 12.x, 14.x | 4.0 |
For all
Upgrade your versions of TypeScript and Node.JS if necessary.
By topic
Authentication with sessions (session tokens) and CSRF protection
Service and application initialization
Error-handling and hook post functions
Common issue
If you get unexpected errors when building the application, please check the following points:
- You have updated all your
@foal/x
packages. - You have updated your
typescript
dependency to version 4.
Rare cases
- The following objects and functions have been removed:
ObjectDoesNotExist
,isObjectDoesNotExist
,PermissionDenied
,isPermissionDenied
,ValidationError
,isValidationError
,validate
. - The
legacy
option has been removed fromhashPassword
andverifyPassword
. If you used it, please submit an issue. - The command
foal g sub-app
has been removed. - The functions
createService
andcreateController
do not accept aServiceManager
as second argument. - The
@Hook
decorator only accepts one function. - The type
ExpressApplication = any
has been removed. - The property
req.foal.ctx
does not exist anymore in post middlewares.