From 49fd0cc6355a4a2f5de366a5c9b9f4ac48223748 Mon Sep 17 00:00:00 2001 From: sZLukas1607 Date: Fri, 29 May 2020 08:50:35 +0200 Subject: [PATCH] --- Router.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Router.md 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); +}