-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextension.js
More file actions
26 lines (21 loc) · 1.01 KB
/
extension.js
File metadata and controls
26 lines (21 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
'use strict';
const colors = require('./colors.json');
module.exports = function (nodecg) {
/*nodecg.log.info('Hello, from your bundle\'s extension!');
nodecg.log.info('I\'m where you put all your server-side code.');
nodecg.log.info(`To edit me, open "${__filename}" in your favorite text editor or IDE.`);
nodecg.log.info('You can use any libraries, frameworks, and tools you want. There are no limits.');
nodecg.log.info('Visit https://nodecg.com for full documentation.');
nodecg.log.info('Good luck!');*/
const router = nodecg.Router();
router.get('/teamImg/:imgTeam', (req, res) => {
res.sendFile(`./graphics/images/logos/${req.params.imgTeam}.png`, {root: __dirname});
});
router.get('/bg', (req, res) => {
res.sendFile(`./graphics/bg.mp4`, {root: __dirname});
});
router.get('/planks/:textname', (req, res) => {
res.sendFile(`./graphics/ingame/${req.params.textname}.png`, {root: __dirname});
});
nodecg.mount('/my-first-bundle', router); // The route '/my-bundle/customroute` is now available
};