h5p/editorto the endpoint configured in
config.libraryUrl. The out-of-the-box Express adapter already includes a route for this.
H5PEditor. That way you can use a database of your choice, cache data in Redis or store user data in an object storage system.
fsfolder store all data in the local file system and are only for demonstration purposes and not suitable to be used in a multi-user environment and not optimized for speed. You might be able to use them in a cluster setup by using a network storage.
H5PEditor.temporaryFileManager.cleanUp()every 5 minutes. This checks which temporary files have expired and deletes them if necessary. It is important to do this, as temporary files are not automatically deleted when a piece of content is saved.
H5PEditor.contentTypeCache.updateIfNecessary()every 12 hours. This will download information about the available content types from the H5P Hub. If you don't do this, users won't be shown new content types or updates to existing content types when they become available.
AggregateH5PError(a collection of several errors). Both errors types represent errors that can be sent to the user to be displayed in the client (in the user's language). They don't include the English error message but an error id that you must translate yourself. Error ids and their English translations can be found in [
/packages/h5p-server/assets/translations]. The translation strings follow the format used by i18next, but in theory you can use any localization library.
Errorobjects. In this case the error is not caused by the business logic, but by some more basic functionality (file system, other library) or it might be an error that is addressed at the developer (i.e. because function parameters aren't correctly used).