Constructor for the main frontend API entry point.
Express app.
Configuration for the mesh server.
Express app.
Configuration for the mesh server.
Make a GET request to the mesh backend.
The Mesh Request
The url you want to GET
Query params for your request.
A promise that will be fulfilled once the request has been completed and will fail if the request fails.
Load all child nodes of a specified node.
The mesh request / Express request.
The specified node, which children should be loaded.
QueryParams to specify the language and other options.
A promise that will be fulfilled once the children have been loaded and will be rejected if loading the children fails.
Load a navigation object by its path. e.g. / for the root navigation. You can only load navigation objects for container nodes.
The mesh request / Express request.
The path for which the navigation object should be loaded.
QueryParams to specify the language, navigation depth, includeAll and other options.
A promise that will be fulfilled once the navigation object has been loaded and will be rejected if loading of the navigation object fails.
Load a navigation object by its uuid. You can only load navigation objects for container nodes.
The mesh request / Express request.
The uuid of the root node of the navigation tree you want to load.
QueryParams to specify the language, navigation depth, includeAll and other options.
A promise that will be fulfilled once the navigation object has been loaded and will be rejected if loading of the navigation object fails.
Load a Mesh node with the specified uuid.
The mesh request / Express request.
The uuid of the node that should be loaded.
QueryParams to specify the language and other options.
A promise that will be fulfilled once the Mesh node is loaded and will be rejected if loading of the Mesh node fails.
Private method that constructs the quest handler, that will serve the Mesh content from webroot.
Load the tag families of the current project.
The mesh request / Express request.
Query params to specify pagination.
A promise that will be fulfilled once the tag families have been loaded and will be rejected if loading of the tag families fails.
Load the tags that are contained in a tag family.
The mesh request / Express request.
The uuid of the tag family.
Query params to specify pagination.
A promise that will be fulfilled once the tags have been loaded and will fail if loading of the tags fail.
Login to Gentics Mesh with the provided user. All subsequent requests with the same session will use the provided credentials for requests to Mesh.
The mesh request / Express request.
Login
Password
A promise that will be fulfilled as soon es the login completes and will be rejected if the login fails.
Logout from Gentics Mesh. All subsequent requests with the same session will use the default user that has been configured in the MeshConfig for requests to Mesh.
The mesh request / Express request.
A promise that will be fulfilled as soon as the logout completes and will be rejected if the logout fails.
Register a custom error handler. A error handler will be executed if an error with the status it has been registered for occurs.
The status the handler should be registered for
The handler that should be registered
Private method that will register the mesh middleware in the Express app. This middleware will enrich the mesh request with the configuration and the active language.
The Express app.
Register a custom schema handler. A registered schema handler will be executed before a node with the schema it has been registered for will be rendered. This can be used to fetch additional information and perform operations on the data provided by Mesh.
Schema the handler should be registered for
The handler that should be registered
Register default template filters. Out of the box we support registering filters with swig and handlebars. If you have a different template engine please pass a register function to register the filters with your template engine. This function will then be called for each of the mesh filters.
Your template engine.
register function that will be called for each of the mesh filters.
Register a custom view handler. A view handler will be executed every time before a view is being rendered by the Mesh frontend. This can be used to fetch additional information and perform operations on the data provided by Mesh.
The handler that should be registered
Render a Mesh node. This function will render the provided node with the view that is named after the node's schema. If the view with this name is not available, the default view will be rendered. All registered handlers that apply for this function will be executed.
Mesh node that should be rendered.
The mesh request / Express request.
The mesh response / Express response.
Render a view. This function will render the provided view. If the view with this name is not available, the default view will be rendered. All registered handlers that apply for this function will be executed.
name of the view that should be rendered.
Data that should be passed to the view.
The mesh request / Express request.
The mesh response / Express response.
Make a request to the mesh backend.
The request method (GET/POST/PUT/DELETE/...)
The Mesh Request
The url you want to GET
Query params for your request.
Data you want to send with the request (PUT/POST)
A promise that will be fulfilled once the request has been completed and will fail if the request fails.
Perform a search for Mesh Nodes.
The mesh request / Express request.
The elastic search query object.
NodeListParams to implement pagination.
A promise that will be fulfilled once the search request complets and will be rejected if the search fails.
Initialize the Mesh server. Call this method after you added your own request handlers to the Express app, as this method will attach a * handler to catch all requests that have not been handled by another handler.
The Express app.
Generated using TypeDoc
Main entry point for the frontend API. Use this class to power your express mesh server.
Usage: import * as mesh from 'express-mesh'; var Mesh = new mesh.Mesh(new mesh.MeshConfig('Demo', 'public', 'languages')); Mesh.server(app);