Skip to main content

Custom Routes

NodeCG uses express for its routing, and exposes a helper for creating routes easily:

// bundles/my-bundle/extension.js

module.exports = function (nodecg) {
const router = nodecg.Router();

router.get('/customroute', (req, res) => {
res.send('OK!');
});

nodecg.mount('/my-bundle', router); // The route '/my-bundle/customroute` is now available
};