Skip to main content

mount

function mount(router)
Server only

This item is only present in the API object given to an extension; it is not available in panels and graphics.

Mount a router created by createRouter into the underlying application.

Custom routers are mounted in the order that extensions are loaded.

Example:

    // Simple router test.
const router = omphalos.createRouter();

router.get('/my_custom_route', (req, res) => res.send('it worked!'))
omphalos.mount(router);