diff --git a/Router.md b/Router.md new file mode 100644 index 0000000..17726f1 --- /dev/null +++ b/Router.md @@ -0,0 +1,15 @@ +EXTENSION ONLY +This can only be used in code which runs on the server. +Router +Creates a new express router. +See the express docs for full usage details. +#Example +Defining a simple GET route: +Copy +module.exports = function (nodecg) { + const app = nodecg.Router(); + app.get('/my-bundle/example', (req, res) => { + res.send('custom route confirmed'); + }); + nodecg.mount(app); +}