2020-05-29 08:50:35 +02:00
parent 625cc1949b
commit 49fd0cc635

15
Router.md Normal file

@ -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);
}