Skip to content

omphalos.createRouter

function omphalos.createRouter()

Create and return back a new express router to allow your extension to respond to any requests it may need to respond to, expose the routes of used libraries, etc.

The created router can be mounted using omphalos.mount().

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